/* ── COMPATIBILITY PAGE ── */
body {
  background-image: url('../img/bg-compat.webp');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
}

/* HERO */
.hero { text-align: center; padding: 24px 16px 16px; }
.hero-title {
  font-size: 30px; font-weight: 700; line-height: 1.3; letter-spacing: -1px;
  margin-bottom: 10px;
  text-shadow: 0 0 24px rgba(251,191,36,0.2);
}
.hero-sub { font-size: 14px; color: var(--text-muted); }

/* INPUT CARD */
.input-card {
  position: relative;
  background: rgba(15,15,35,0.5);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid transparent;
  background-clip: padding-box;
  border-radius: 24px; padding: 28px 22px; overflow: visible;
  box-shadow: 0 8px 40px rgba(139,92,246,0.2), 0 2px 10px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -2px 20px rgba(139,92,246,0.06);
}
.input-card::before {
  content: '';
  position: absolute; inset: -1.5px; border-radius: 25px;
  background: linear-gradient(135deg, rgba(139,92,246,0.4), rgba(251,191,36,0.3), rgba(139,92,246,0.2));
  z-index: -1;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude; -webkit-mask-composite: xor; padding: 1.5px;
}
.input-card::after {
  content: '';
  position: absolute; bottom: -20px; left: 10%; right: 10%; height: 60px;
  background: radial-gradient(ellipse, rgba(139,92,246,0.15), transparent 70%);
  pointer-events: none; filter: blur(20px);
}
.person-block { margin-bottom: 8px; }
.person-label {
  font-size: 13px; font-weight: 700; color: var(--gold);
  margin-bottom: 8px; letter-spacing: 0.5px;
}
.input-row { display: flex; gap: 8px; margin-bottom: 12px; }
.input-row input {
  flex: 1; min-width: 0; padding: 13px 14px;
  background: rgba(10,14,39,0.8);
  border: 1px solid rgba(251,191,36,0.15);
  border-radius: 12px;
  color: var(--white); font-size: 15px; font-family: inherit;
  outline: none; -webkit-appearance: none;
  transition: border 0.2s;
}
.input-row input:focus { border-color: var(--gold); }
.input-row input::placeholder { color: var(--text-dim); }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.heart-divider {
  text-align: center; font-size: 28px; padding: 8px 0;
}

.btn-cta {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #1a1a2e; border: none; border-radius: 14px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 20px rgba(251,191,36,0.3);
  transition: all 0.2s;
}
.btn-cta:hover { box-shadow: 0 6px 30px rgba(251,191,36,0.5); transform: translateY(-1px); }

/* SCORE CARD */
.score-card {
  text-align: center;
  background: rgba(15,15,35,0.55);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(139,92,246,0.12);
  border-radius: 24px;
  padding: 32px 22px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.04);
}
.score-circle { display: inline-flex; align-items: baseline; gap: 4px; margin-bottom: 16px; }
.score-num {
  font-family: 'Playfair Display', serif;
  font-size: 72px; font-weight: 700; color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 40px rgba(251,191,36,0.3);
}
.score-label { font-size: 18px; color: var(--text-muted); }
.type-emoji { font-size: 40px; margin-bottom: 8px; }
.type-name { font-size: 22px; font-weight: 700; color: var(--white); margin-bottom: 6px; }
.type-desc { font-size: 14px; color: var(--text-muted); }

/* GLASS BOX */
.glass-box {
  background: rgba(15,15,35,0.55);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(139,92,246,0.12);
  border-radius: 20px;
  padding: 22px 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.04);
}
.box-title {
  font-size: 15px; font-weight: 700; margin-bottom: 16px;
  color: var(--text-sec);
}

/* VERSUS */
.versus-box {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  padding: 24px 18px;
}
.versus-person { text-align: center; flex: 1; }
.versus-hanja {
  font-family: 'Playfair Display', serif;
  font-size: 36px; font-weight: 700; color: var(--gold);
  margin-bottom: 4px;
}
.versus-name { font-size: 13px; color: var(--text-muted); }
.versus-vs {
  font-size: 18px; font-weight: 700; color: var(--text-dim);
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
}

/* DETAIL */
.detail-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.detail-type {
  font-size: 16px; font-weight: 700; color: var(--gold);
}
.detail-score {
  font-size: 14px; color: var(--text-muted);
  background: rgba(251,191,36,0.08);
  padding: 4px 12px; border-radius: 100px;
}
.detail-desc { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* ADVICE */
.advice-text { font-size: 14px; color: var(--text-muted); line-height: 1.8; white-space: pre-line; }

/* CTA */
.cta-card {
  display: flex; align-items: center; gap: 12px;
  background: rgba(15,15,35,0.5); backdrop-filter: blur(12px);
  border: 1px solid rgba(139,92,246,0.15); border-radius: 16px;
  padding: 16px; text-decoration: none; color: inherit;
  transition: all 0.2s;
}
.cta-card:hover { border-color: var(--gold); }
.cta-icon { font-size: 28px; }
.cta-info { flex: 1; }
.cta-info strong { display: block; font-size: 15px; color: var(--gold); }
.cta-info small { font-size: 11px; color: var(--text-muted); }
.cta-arrow { font-size: 20px; color: var(--gold); }

/* SHARE — common.css 통일 */

/* 일주 동물 비교 */
.animal-vs { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 12px 0; }
.animal-person { text-align: center; }
.animal-img-wrap { width: 64px; height: 64px; border-radius: 50%; padding: 8px; border: 2px solid rgba(251,191,36,0.3); margin: 0 auto 6px; }
.animal-img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.animal-label { font-size: 13px; font-weight: 700; color: var(--gold); }
.animal-heart { font-size: 20px; color: var(--text-dim); }

/* 오행별 동물 색상 필터 */
.animal-wood img { filter: brightness(0.5) sepia(1) hue-rotate(80deg) saturate(3); }
.animal-fire img { filter: none; }
.animal-earth img { filter: brightness(0.9) sepia(1) saturate(1.5) hue-rotate(10deg); }
.animal-metal img { filter: brightness(3) saturate(0) opacity(0.8); }
.animal-water img { filter: brightness(0.3) sepia(1) hue-rotate(180deg) saturate(4); }

/* 오행별 테두리 색상 */
.animal-wood { border-color: rgba(16,185,129,0.5); }
.animal-fire { border-color: rgba(249,115,22,0.5); }
.animal-earth { border-color: rgba(251,191,36,0.5); }
.animal-metal { border-color: rgba(229,231,235,0.5); }
.animal-water { border-color: rgba(59,130,246,0.5); }

/* 사주원국 비교 */
.saju-compare-row { display: flex; gap: 8px; margin-bottom: 8px; }
.saju-compare-row .sc-label { width: 32px; font-size: 10px; color: var(--text-dim); text-align: right; padding-top: 6px; flex-shrink: 0; }
.saju-compare-row .sc-cards { display: flex; gap: 4px; flex: 1; }
.sc-card { flex: 1; text-align: center; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; padding: 4px 2px; }
.sc-card .sc-pos { font-size: 8px; color: var(--text-dim); }
.sc-card .sc-char { font-size: 16px; font-weight: 700; }

/* 오행 비교 차트 */
.oheng-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.oheng-label { width: 40px; font-size: 12px; font-weight: 600; text-align: right; }
.oheng-bars { flex: 1; display: flex; gap: 2px; }
.oheng-bar-left { height: 14px; border-radius: 3px 0 0 3px; text-align: right; padding-right: 4px; font-size: 9px; line-height: 14px; color: white; font-weight: 600; }
.oheng-bar-right { height: 14px; border-radius: 0 3px 3px 0; text-align: left; padding-left: 4px; font-size: 9px; line-height: 14px; color: white; font-weight: 600; }

/* 특수 관계 */
.special-tag { display: inline-block; padding: 6px 14px; border-radius: 100px; font-size: 13px; font-weight: 600; margin: 3px; }
.special-tag.good { background: rgba(16,185,129,0.1); color: #10b981; border: 1px solid rgba(16,185,129,0.2); }
.special-tag.warn { background: rgba(249,115,22,0.1); color: #f97316; border: 1px solid rgba(249,115,22,0.2); }
.special-desc { font-size: 12px; color: var(--text-muted); margin-top: 8px; line-height: 1.6; }

/* 카테고리별 점수 */
.cat-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cat-label { width: 50px; font-size: 13px; font-weight: 600; color: var(--text-sec); }
.cat-bar { flex: 1; height: 10px; background: rgba(255,255,255,0.04); border-radius: 5px; overflow: hidden; }
.cat-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--purple), var(--gold)); transition: width 0.8s; }
.cat-score { width: 35px; font-size: 12px; font-weight: 700; color: var(--gold); text-align: right; }

/* 성별 인라인 */
.gender-row-inline { display: flex; gap: 4px; }
.gender-btn-sm { cursor: pointer; }
.gender-btn-sm input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.gender-btn-sm span {
  display: block; padding: 12px 14px; border-radius: 12px;
  background: rgba(10,14,39,0.8); border: 1px solid rgba(251,191,36,0.15);
  color: var(--text-muted); font-size: 14px; font-weight: 600; transition: all 0.2s;
}
.gender-btn-sm input:checked + span {
  border-color: var(--gold); color: var(--gold);
  background: rgba(251,191,36,0.08);
}

/* 궁합 상세 풀이 CTA */
.premium-cta {
  text-align: center;
  background: rgba(15,15,35,0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 24px; padding: 40px 24px;
}
.premium-hook { font-size: 22px; font-weight: 700; color: var(--white); line-height: 1.5; margin-bottom: 12px; }
.premium-hook strong { color: var(--gold); display: block; font-size: 24px; margin-top: 4px; }
.premium-sub { font-size: 15px; color: var(--text-muted); margin-bottom: 28px; }
.premium-list { text-align: left; margin-bottom: 24px; background: rgba(255,255,255,0.03); border-radius: 16px; padding: 18px; border: 1px solid rgba(139,92,246,0.1); }
.premium-list-title { font-size: 13px; font-weight: 700; color: var(--gold); margin-bottom: 12px; }
.premium-items { display: flex; flex-wrap: wrap; gap: 8px; }
.premium-items span { font-size: 14px; color: var(--text-sec); font-weight: 500; background: rgba(139,92,246,0.1); border: 1px solid rgba(139,92,246,0.15); padding: 6px 14px; border-radius: 100px; }
.premium-count { font-size: 14px; color: var(--gold); font-weight: 600; margin-bottom: 20px; }
.premium-event {
  display: inline-block;
  font-size: 12px; font-weight: 700; color: #1a1a2e;
  background: var(--gold);
  padding: 3px 12px; border-radius: 100px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.premium-price { font-size: 18px; margin-bottom: 14px; }
.price-original { color: var(--text-dim); text-decoration: line-through; font-size: 15px; margin-right: 8px; }
.price-sale { color: var(--gold); font-weight: 900; font-size: 24px; }
.btn-premium { width: 100%; padding: 18px; background: linear-gradient(135deg, var(--gold-dark), var(--gold)); color: #1a1a2e; border: none; border-radius: 16px; font-size: 18px; font-weight: 800; cursor: pointer; font-family: inherit; box-shadow: 0 4px 24px rgba(251,191,36,0.3); transition: all 0.2s; }
.btn-premium:hover { box-shadow: 0 6px 30px rgba(251,191,36,0.5); transform: translateY(-1px); }

/* 풀이 결과 */
.reading-text { font-size: 14px; color: var(--text-muted); line-height: 1.9; }
.conclusion-box { text-align: center; padding: 28px 20px; background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(251,191,36,0.06)); border: 1px solid rgba(251,191,36,0.2); border-radius: 20px; }
.conclusion-box .reading-text { font-size: 16px; font-weight: 600; color: var(--gold); line-height: 1.8; }

/* 로딩 */
.loading-ring { width: 48px; height: 48px; margin: 0 auto 20px; }
.loading-ring-inner { width: 100%; height: 100%; border: 3px solid rgba(139,92,246,0.1); border-top: 3px solid var(--gold); border-radius: 50%; animation: spin 1.2s ease-in-out infinite; }
@keyframes spin { 0%{transform:rotate(0deg)} 100%{transform:rotate(360deg)} }
.loading-msg { font-size: 14px; color: var(--text-sec); text-align: center; transition: opacity 0.3s ease; }

/* MOBILE */
@media (max-width: 420px) {
  .hero-title { font-size: 26px; }
  .score-num { font-size: 56px; }
  .versus-hanja { font-size: 28px; }
  .share-row { flex-direction: column; }
}
