/* ═══════════════════════════════════════════════════════════════
   샤먼 리딩 — Stylesheet
   라이트 모드 / 6가지 카드 컬러 시스템 (보라·앰버·핑크·시안·그린)
   ═══════════════════════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* 베이스 */
  --bg-top: #f5f1ff;
  --bg-bottom: #ffffff;
  --text-1: #111827;
  --text-2: #374151;
  --text-3: #6b7280;
  --text-4: #9ca3af;

  /* 카드 컬러 시스템 */
  --purple-bg: #f3edfd;
  --purple-bg-2: #ede4fb;
  --purple-mid: #a855f7;
  --purple-strong: #9333ea;
  --purple-deep: #7e22ce;

  --amber-bg: #fef5e1;
  --amber-bg-2: #fdecc8;
  --amber-mid: #f59e0b;
  --amber-strong: #d97706;
  --amber-deep: #92400e;

  --pink-bg: #fde7f1;
  --pink-bg-2: #fbd5e6;
  --pink-mid: #ec4899;
  --pink-strong: #db2777;
  --pink-deep: #be185d;

  --cyan-bg: #d4f4f7;
  --cyan-bg-2: #b8ecf2;
  --cyan-mid: #06b6d4;
  --cyan-strong: #0891b2;
  --cyan-deep: #0e7490;

  --green-bg: #d1fae5;
  --green-bg-2: #a7f3d0;
  --green-mid: #10b981;
  --green-strong: #059669;
  --green-deep: #047857;

  --yellow-soft: #fef3c7;
  --yellow-text: #92400e;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 8px 24px rgba(99, 53, 167, 0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
               'Inter', system-ui, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-1);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 60%);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(168, 85, 247, 0.08);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #c084fc 0%, #f472b6 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
  transition: transform 0.2s ease;
}
.header-logo:hover { transform: scale(1.05); }
.header-logo svg { width: 20px; height: 20px; }

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--purple-strong);
  border-radius: 999px;
  transition: background 0.2s ease;
}
.nav-pill:hover { background: var(--purple-bg); }
.nav-pill svg { width: 16px; height: 16px; }

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.charge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #a78bfa 0%, #c084fc 50%, #f472b6 100%);
  border-radius: 999px;
  position: relative;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.charge-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35); }

.charge-icon { font-size: 14px; }

.charge-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  border: 2px solid white;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #9333ea 0%, #c026d3 100%);
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(147, 51, 234, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(147, 51, 234, 0.45); }
.cta-btn svg { width: 14px; height: 14px; }

/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--yellow-soft);
  color: var(--yellow-text);
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero-badge-icon { color: #f59e0b; font-size: 14px; }
.hero-badge strong { font-weight: 700; }

.hero-title {
  font-size: 38px;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: 15px;
  color: var(--text-3);
}

/* ═══════════════════════════════════════════════════════════════
   SHAMAN GRID
   ═══════════════════════════════════════════════════════════════ */

.shamans {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}

.shaman-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

@media (max-width: 1024px) {
  .shaman-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .shaman-grid { grid-template-columns: 1fr; gap: 16px; }
  .hero-title { font-size: 28px; }
  .header-inner { padding: 12px 16px; }
  .charge-btn span:not(.charge-badge):not(.charge-icon) { display: none; }
}

/* ───────────── CARD ───────────── */

.card {
  border-radius: 18px;
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(99, 53, 167, 0.15);
}

.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.05;
  overflow: hidden;
  background: #e5e7eb;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.card:hover .card-image { transform: scale(1.04); }

/* 카테고리 배지 (이미지 위 좌측 하단) */
.cat-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  color: white;
  border-radius: 6px;
  z-index: 2;
}
.cat-purple { background: var(--purple-mid); }
.cat-amber  { background: var(--amber-strong); }
.cat-pink   { background: var(--pink-mid); }
.cat-cyan   { background: var(--cyan-mid); }
.cat-green  { background: var(--green-mid); }

.card-meta {
  position: absolute;
  bottom: 14px;
  right: 14px;
  font-size: 12px;
  font-weight: 500;
  color: white;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

/* ─── 카드 본문 (배경 색깔 적용) ─── */
.card-body {
  padding: 20px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-purple .card-body { background: var(--purple-bg); }
.card-amber  .card-body { background: var(--amber-bg); }
.card-pink   .card-body { background: var(--pink-bg); }
.card-cyan   .card-body { background: var(--cyan-bg); }
.card-green  .card-body { background: var(--green-bg); }

.card-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.card-quote {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 14px;
}

.card-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: 14px;
}

/* ─── 불릿 리스트 ─── */
.card-list {
  margin-bottom: 16px;
}
.card-list li {
  position: relative;
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
  margin-bottom: 7px;
}
.card-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}
.card-list li::after {
  content: '✓';
  position: absolute;
  left: 3px;
  top: 4px;
  font-size: 9px;
  font-weight: 900;
  color: white;
  line-height: 1;
}

.dot-purple li::before { background: var(--purple-mid); }
.dot-amber  li::before { background: var(--amber-strong); }
.dot-pink   li::before { background: var(--pink-mid); }
.dot-cyan   li::before { background: var(--cyan-mid); }
.dot-green  li::before { background: var(--green-mid); }

/* ─── 별점 + 후기 ─── */
.card-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
}
.star {
  color: #fbbf24;
  font-size: 14px;
  letter-spacing: -1px;
}
.review-count {
  font-size: 12px;
  color: var(--text-3);
  margin-left: 8px;
}
.style-tag {
  font-size: 11.5px;
  color: var(--text-3);
  font-weight: 500;
}

/* ─── 액션 버튼 ─── */
.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 10px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* light 버튼 (좌측 채팅하기) */
.btn-light {
  background: white;
  box-shadow: var(--shadow-sm);
}
.c-purple { color: var(--purple-strong); }
.c-amber  { color: var(--amber-deep); }
.c-pink   { color: var(--pink-deep); }
.c-cyan   { color: var(--cyan-deep); }
.c-green  { color: var(--green-deep); }

.btn-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-3);
}

/* solid 버튼 (우측 메인 CTA) */
.btn-solid {
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.bg-purple { background: var(--purple-strong); }
.bg-amber  { background: var(--amber-deep); }
.bg-pink   { background: var(--pink-deep); }
.bg-cyan   { background: var(--cyan-deep); }
.bg-green  { background: var(--green-strong); }

.bg-purple:hover { background: var(--purple-deep); }
.bg-amber:hover  { background: #78350f; }
.bg-pink:hover   { background: #9d174d; }
.bg-cyan:hover   { background: #155e75; }
.bg-green:hover  { background: var(--green-deep); }

/* ═══════════════════════════════════════════════════════════════
   FAB — Talk with Us (우하단 플로팅)
   ═══════════════════════════════════════════════════════════════ */

.fab-talk {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px 12px 16px;
  color: white;
  background: #0f1119;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(15, 17, 25, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fab-talk:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(15, 17, 25, 0.45);
}
.fab-talk svg { width: 18px; height: 18px; color: #22d3ee; }

@media (max-width: 640px) {
  .fab-talk { bottom: 16px; right: 16px; padding: 10px 16px 10px 12px; font-size: 13px; }
}

/* ───── 진입 애니메이션 ───── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card {
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.12s; }
.card:nth-child(3) { animation-delay: 0.19s; }
.card:nth-child(4) { animation-delay: 0.26s; }
.card:nth-child(5) { animation-delay: 0.33s; }
.card:nth-child(6) { animation-delay: 0.40s; }

.hero { animation: fadeUp 0.5s ease both; }

/* ════════════════════════════════════════════════════════════════
   DARK MODE — body.dark일 때 shaman-reading 페이지 다크로 변환
   ════════════════════════════════════════════════════════════════ */
body.dark {
  --bg-top: #0f0a1f;
  --bg-bottom: #07060f;
  --text-1: #ffffff;
  --text-2: #c5c4d6;
  --text-3: #9ca3af;
  --text-4: #6b7280;

  /* 카드 배경을 어둡게 + 액센트는 유지 */
  --purple-bg: rgba(168, 85, 247, 0.12);
  --purple-bg-2: rgba(168, 85, 247, 0.18);
  --amber-bg: rgba(245, 158, 11, 0.12);
  --amber-bg-2: rgba(245, 158, 11, 0.18);
  --pink-bg: rgba(236, 72, 153, 0.12);
  --pink-bg-2: rgba(236, 72, 153, 0.18);
  --cyan-bg: rgba(6, 182, 212, 0.12);
  --cyan-bg-2: rgba(6, 182, 212, 0.18);
  --green-bg: rgba(16, 185, 129, 0.12);
  --green-bg-2: rgba(16, 185, 129, 0.18);
  --yellow-soft: rgba(245, 158, 11, 0.15);
  --yellow-text: #fbbf24;
}
body.dark body,
body.dark.body { /* idempotent fallback */
  background: var(--bg-bottom);
}
body.dark .header {
  background: rgba(15, 10, 31, 0.88) !important;
  border-bottom: 1px solid rgba(168, 85, 247, 0.18) !important;
  backdrop-filter: blur(12px);
}
body.dark .header-logo svg { color: #c084fc; }
body.dark .nav-pill {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
}
body.dark .nav-pill:hover { background: rgba(168, 85, 247, 0.2); }

body.dark .hero-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

body.dark .shaman-card {
  background: linear-gradient(180deg, rgba(40, 28, 70, 0.92) 0%, rgba(22, 16, 42, 0.95) 100%);
  border: 1px solid rgba(168, 85, 247, 0.28);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
body.dark .shaman-card:hover {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow:
    0 12px 40px rgba(168, 85, 247, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
body.dark .card-name { color: var(--text-1); }
body.dark .card-tagline { color: var(--text-2); }
body.dark .card-desc,
body.dark .feature-list li { color: var(--text-2); }
body.dark .feature-list li strong { color: var(--text-1); }

/* feature-list 박스 (보라 박스) — 다크에서도 잘 보이게 */
body.dark .feature-box,
body.dark .feature-box-purple,
body.dark .feature-box-amber,
body.dark .feature-box-pink,
body.dark .feature-box-cyan,
body.dark .feature-box-green {
  background: rgba(168, 85, 247, 0.18) !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
}

/* 카드 작은 라벨 — 보라/검정 글자가 안 보이는 문제 해결 */
body.dark .card-tag,
body.dark .card-badge {
  background: rgba(168, 85, 247, 0.22) !important;
  color: #c084fc !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
}

body.dark .btn.btn-light {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-1);
}
body.dark .btn.btn-light:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text-1);
}
body.dark .btn-tag {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text-2);
}
body.dark .style-tag {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-weight: 700;
}
body.dark .review-count { color: var(--text-2); }
body.dark .stars .star { color: #fbbf24; }

body.dark .price-row { color: var(--text-2); }
body.dark .charge-btn {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.3);
  color: #c084fc;
}
body.dark .charge-btn:hover { background: rgba(168, 85, 247, 0.25); }
body.dark .charge-badge {
  background: #ef4444;
  color: white;
}

body.dark .hdr-lang,
body.dark .hdr-my {
  background: rgba(168, 85, 247, 0.15) !important;
  border-color: rgba(168, 85, 247, 0.3) !important;
  color: #c084fc !important;
}

/* ════════════════════════════════════════════════════════════════
   DARK MODE — 카드 본문 (card-body) 가독성 보강
   라이트 파스텔 배경(--purple-bg 등)이 다크에 그대로 남아 글자 안 보이는 문제 해결
   ════════════════════════════════════════════════════════════════ */
body.dark .card-purple .card-body,
body.dark .card-amber  .card-body,
body.dark .card-pink   .card-body,
body.dark .card-cyan   .card-body,
body.dark .card-green  .card-body {
  background: linear-gradient(180deg, rgba(28, 22, 50, 0.96) 0%, rgba(18, 14, 36, 0.98) 100%) !important;
}

/* 색상별로 살짝 다른 톤 (다크에서도 정체성 유지) */
body.dark .card-purple .card-body { background: linear-gradient(180deg, rgba(45, 25, 80, 0.85) 0%, rgba(20, 15, 40, 0.95) 100%) !important; }
body.dark .card-amber  .card-body { background: linear-gradient(180deg, rgba(60, 35, 15, 0.85) 0%, rgba(25, 18, 12, 0.95) 100%) !important; }
body.dark .card-pink   .card-body { background: linear-gradient(180deg, rgba(70, 25, 50, 0.85) 0%, rgba(28, 14, 24, 0.95) 100%) !important; }
body.dark .card-cyan   .card-body { background: linear-gradient(180deg, rgba(15, 45, 60, 0.85) 0%, rgba(10, 22, 30, 0.95) 100%) !important; }
body.dark .card-green  .card-body { background: linear-gradient(180deg, rgba(15, 55, 40, 0.85) 0%, rgba(8, 28, 20, 0.95) 100%) !important; }

/* 본문 텍스트 모두 흰색으로 강제 */
body.dark .card-name,
body.dark .shaman-card .card-name {
  color: #ffffff !important;
}
body.dark .card-tagline,
body.dark .shaman-card .card-tagline {
  color: #e5e7eb !important;
}
body.dark .card-desc,
body.dark .shaman-card .card-desc {
  color: #d1d5db !important;
}
body.dark .feature-list li,
body.dark .shaman-card .feature-list li {
  color: #ffffff !important;
}
body.dark .feature-list li strong { color: #ffffff !important; }
body.dark .feature-list li::before,
body.dark .shaman-card .feature-list li::before {
  color: #ffffff !important;
}

/* 후기 카운트 + 별점 (다크에서 더 잘 보이게) */
body.dark .review-count,
body.dark .shaman-card .review-count {
  color: #d1d5db !important;
}
body.dark .stars .star { color: #fbbf24 !important; }

/* 스타일 태그 (통합형·심층, 직구형·단호함 등) */
body.dark .style-tag,
body.dark .shaman-card .style-tag {
  background: rgba(245, 158, 11, 0.22) !important;
  color: #fcd34d !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  font-weight: 700;
}

/* 카테고리 태그 (전 분야, 전생·운명 등) - 카드 이미지 위 */
body.dark .card-category,
body.dark .shaman-card .card-category {
  color: white !important;
}

/* 채팅하기 / 사주 풀이 보기 / 리포트 선택하기 버튼 - 더 진하게 */
body.dark .btn.btn-light {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: white !important;
}
body.dark .btn.btn-light span { color: white !important; }
body.dark .btn.btn-light:hover {
  background: rgba(255, 255, 255, 0.14) !important;
}
body.dark .btn-tag {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #d1d5db !important;
}

/* "운명의 모든 것을 꿰뚫어 봅니다" 같은 따옴표 부제 */
body.dark .card-quote,
body.dark .shaman-card .card-quote {
  color: #f9a8d4 !important;
}
