/* ── PALJA PAGE ── */
body {
  background-image: url('../img/bg-palja.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 (대문 card-feature 스타일 기반) */
.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);
}
.input-title {
  font-size: 18px; font-weight: 700; text-align: center;
  margin-bottom: 20px; color: var(--white);
}
.input-field { margin-bottom: 12px; }
.input-field input, .input-row input, .input-row select {
  width: 100%; 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-field input:focus, .input-row input:focus, .input-row select:focus {
  border-color: var(--gold);
}
.input-field input::placeholder, .input-row input::placeholder { color: var(--text-dim); }
.input-row { display: flex; gap: 8px; margin-bottom: 12px; }
.input-row input, .input-row select { flex: 1; }
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; }

/* GENDER */
.gender-row {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.gender-btn {
  flex: 1; cursor: pointer;
}
.gender-btn input[type="radio"] {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.gender-btn span {
  display: block; text-align: center;
  padding: 12px; 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: 15px; font-weight: 600;
  transition: all 0.2s;
}
.gender-btn input:checked + span {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(251,191,36,0.08);
  box-shadow: 0 0 12px rgba(251,191,36,0.1);
}

.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); }

/* RESULT NAME */
.result-name {
  font-size: 26px; font-weight: 700; text-align: center;
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(251,191,36,0.2);
}

/* PILLARS (사주원국 카드) */
.pillars { display: flex; gap: 10px; justify-content: center; }
.pillar {
  flex: 1; max-width: 110px;
  background: rgba(15,15,35,0.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: 18px;
  padding: 14px 8px; text-align: center;
  transition: all 0.2s;
}
.pillar--day {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(251,191,36,0.15), inset 0 0 20px rgba(251,191,36,0.03);
}
.pillar-label { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: 1px; margin-bottom: 10px; }
.pillar--day .pillar-label { color: var(--gold); }
.pillar-stem { font-family: 'Playfair Display',serif; font-size: 36px; font-weight: 700; line-height: 1; }
.pillar-kr { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.pillar-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 10px 4px; }
.pillar-branch { font-family: 'Playfair Display',serif; font-size: 36px; font-weight: 700; line-height: 1; }

/* 오행 색상 */
.oh-木 { color: #10b981; }
.oh-火 { color: #f97316; }
.oh-土 { color: #fbbf24; }
.oh-金 { color: #e5e7eb; }
.oh-水 { color: #3b82f6; }

/* 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);
}

/* 오행 레이더 */
.ohang-radar-wrap { max-width: 280px; margin: 0 auto 10px; }
.ohang-radar-svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 0 12px rgba(251,191,36,0.1)); }
.ohang-radar-svg polygon[fill*="rgba(251,191,36"] { transition: all 0.4s ease; }

/* 오행 바 */
.ohang-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ohang-bar-name { font-size: 13px; font-weight: 600; width: 55px; text-align: right; }
.ohang-bar { flex: 1; height: 8px; background: rgba(255,255,255,0.04); border-radius: 4px; overflow: hidden; }
.ohang-bar-fill { height: 100%; border-radius: 4px; transition: width 0.8s ease; }
.ohang-bar-count { font-size: 12px; color: var(--text-muted); width: 30px; }
.ohang-interp { margin-top: 14px; font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* 십성 */
.sipsung-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sipsung-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 100px;
  font-size: 13px; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
}
.sipsung-char { font-family: 'Playfair Display',serif; font-size: 16px; font-weight: 700; }
.sipsung-name { color: var(--text-muted); }
.sipsung-interp { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* 성격 */
.personality-summary { font-size: 16px; font-weight: 700; color: var(--gold); text-align: center; margin-bottom: 14px; }
.personality-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.p-item { background: rgba(255,255,255,0.02); border-radius: 12px; padding: 12px; }
.p-label { font-size: 10px; font-weight: 700; color: var(--gold); letter-spacing: 0.5px; margin-bottom: 3px; }
.p-text { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.keyword-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.kw-tag { background: rgba(251,191,36,0.1); color: var(--gold); border: 1px solid rgba(251,191,36,0.2); padding: 3px 12px; border-radius: 100px; font-size: 11px; font-weight: 600; }

/* 올해 운세 */
.expand-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; color: var(--gold); font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: inherit; padding: 0;
}
#yearly-content { padding-top: 16px; }
.yearly-header { font-size: 12px; color: var(--text-muted); text-align: center; margin-bottom: 12px; }
.yearly-text { font-size: 14px; color: var(--text-muted); line-height: 1.9; white-space: pre-line; margin-bottom: 16px; }
.yearly-caution-box {
  background: rgba(244,67,54,0.04); border: 1px solid rgba(244,67,54,0.1);
  border-radius: 14px; padding: 16px; margin-bottom: 12px; position: relative;
}
.yearly-caution-box::before { content:''; position:absolute; top:0; left:0; width:3px; height:100%; background:#F44336; border-radius:2px 0 0 2px; }
.yearly-caution-label { font-size: 14px; font-weight: 700; color: #F44336; margin-bottom: 8px; padding-left: 8px; }
.yearly-caution-text { font-size: 13px; color: var(--text-muted); line-height: 1.8; padding-left: 8px; }

/* 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 통일 */

/* 신강신약 */
.singang-gauge { margin-bottom: 16px; }
.singang-bar {
  position: relative; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, #fbbf24 0%, #fbbf24 39%, #f97316 40%, #f97316 60%, #3b82f6 61%, #3b82f6 100%);
  opacity: 0.3;
}
.singang-fill {
  position: absolute; top: 0; left: 0; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, #fbbf24 0%, #fbbf24 39%, #f97316 40%, #f97316 60%, #3b82f6 61%, #3b82f6 100%);
  opacity: 1; transition: width 1s ease;
}
.singang-marker {
  position: absolute; top: -4px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--white);
  border: 3px solid var(--gold);
  box-shadow: 0 0 8px rgba(251,191,36,0.4);
  transform: translateX(-50%); transition: left 1s ease;
}
.singang-labels {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-dim); margin-top: 8px;
}
.singang-score { text-align: center; font-size: 32px; font-weight: 900; color: var(--gold); margin-bottom: 4px; }
.singang-type { text-align: center; font-size: 16px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.singang-desc { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* 대운/세운/월운 테이블 */
.box-sub { font-size: 12px; font-weight: 400; color: var(--text-dim); margin-left: 6px; }
.woon-scroll { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.woon-scroll::-webkit-scrollbar { height: 0; }
.woon-col {
  flex: 0 0 auto; width: 64px; text-align: center;
  border-radius: 14px; padding: 8px 4px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.2s;
}
.woon-col--active {
  border-color: var(--gold);
  background: rgba(251,191,36,0.06);
  box-shadow: 0 0 12px rgba(251,191,36,0.1);
}
.woon-age { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 2px; }
.woon-col--active .woon-age { color: var(--gold); }
.woon-sipsung { font-size: 10px; color: var(--text-dim); margin-bottom: 4px; }
.woon-stem {
  font-size: 22px; font-weight: 700; margin-bottom: 2px;
  font-family: 'Playfair Display', serif;
}
.woon-kr { font-size: 10px; color: var(--text-dim); margin-bottom: 4px; }
.woon-branch {
  font-size: 22px; font-weight: 700; margin-bottom: 2px;
  font-family: 'Playfair Display', serif;
}
.woon-sipsung2 { font-size: 10px; color: var(--text-dim); }

/* 상세 풀이 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;
  letter-spacing: -0.5px;
}
.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; letter-spacing: 0.5px;
}
.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;
  letter-spacing: -0.3px;
}
.btn-premium:hover { box-shadow: 0 6px 30px rgba(251,191,36,0.5); transform: translateY(-1px); }

/* 로딩 UI — 오행 오비탈 스피너 */
.loading-ring {
  width: 72px; height: 72px; margin: 0 auto 24px;
  position: relative;
}
.loading-ring-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(139,92,246,0.1);
  position: relative;
  animation: pulse-glow 2s ease-in-out infinite;
}
/* 중앙 금색 점 */
.loading-ring-inner::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 12px; height: 12px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 16px rgba(251,191,36,0.6), 0 0 32px rgba(251,191,36,0.2);
}
/* 회전하는 오비탈 링 1 */
.loading-ring-inner::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top: 2px solid var(--gold);
  border-right: 2px solid var(--purple);
  animation: spin 1.5s linear infinite;
}
/* 두 번째 오비탈 (반대 방향) */
.loading-ring::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-bottom: 1.5px solid rgba(251,191,36,0.5);
  border-left: 1.5px solid rgba(139,92,246,0.4);
  animation: spin-reverse 2s linear infinite;
}
/* 세 번째 오비탈 */
.loading-ring::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top: 1px solid rgba(139,92,246,0.2);
  animation: spin 3s linear infinite;
}

@keyframes spin { 0%{transform:rotate(0deg)} 100%{transform:rotate(360deg)} }
@keyframes spin-reverse { 0%{transform:rotate(0deg)} 100%{transform:rotate(-360deg)} }
@keyframes pulse-glow {
  0%,100% { box-shadow: 0 0 20px rgba(251,191,36,0.1); }
  50% { box-shadow: 0 0 30px rgba(139,92,246,0.2), 0 0 60px rgba(251,191,36,0.1); }
}

.loading-msg {
  font-size: 14px; color: var(--text-sec); text-align: center;
  transition: opacity 0.3s ease;
  letter-spacing: 0.5px;
}

/* 유료 풀이 결과 */
.reading-text { font-size: 14px; color: var(--text-muted); line-height: 1.9; }

.daeun-item { margin-bottom: 14px; padding: 14px; background: rgba(255,255,255,0.02); border-radius: 12px; border-left: 3px solid rgba(139,92,246,0.2); }
.daeun-item.daeun-current { border-left-color: var(--gold); background: rgba(251,191,36,0.04); }
.daeun-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.daeun-age { font-size: 14px; font-weight: 700; color: var(--gold); min-width: 35px; }
.daeun-ganji { font-size: 14px; font-weight: 600; color: var(--white); }
.daeun-text { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

.monthly-item { margin-bottom: 10px; padding: 10px 12px; background: rgba(255,255,255,0.02); border-radius: 10px; }
.monthly-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.monthly-month { font-size: 13px; font-weight: 700; color: var(--gold); min-width: 30px; }
.monthly-keyword { font-size: 13px; font-weight: 600; color: var(--white); flex: 1; }
.monthly-text { font-size: 12px; color: var(--text-muted); line-height: 1.6; }

.rating-good { font-size: 11px; padding: 2px 8px; border-radius: 100px; background: rgba(16,185,129,0.15); color: #10b981; font-weight: 600; }
.rating-warn { font-size: 11px; padding: 2px 8px; border-radius: 100px; background: rgba(249,115,22,0.15); color: #f97316; font-weight: 600; }
.rating-normal { font-size: 11px; padding: 2px 8px; border-radius: 100px; background: rgba(255,255,255,0.06); color: var(--text-dim); font-weight: 600; }
.daeun-rating { margin-left: auto; }
.monthly-rating { margin-left: auto; }

.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; }

/* 풀이 이력 */
.history-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; margin-bottom: 4px;
  border-radius: 10px; background: rgba(255,255,255,0.02);
  text-decoration: none; color: inherit; transition: all 0.2s;
}
.history-item:hover { background: rgba(251,191,36,0.06); }
.history-ilju { font-size: 14px; font-weight: 700; color: var(--gold); min-width: 50px; }
.history-info { flex: 1; font-size: 12px; color: var(--text-muted); }
.history-date { font-size: 11px; color: var(--text-dim); }

/* 조후 분석 */
.johu-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.johu-tag {
  padding: 5px 14px; border-radius: 100px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-sec);
}
.johu-desc { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* 근묘화실 */
.gmhs-grid { display: flex; gap: 6px; }
.gmhs-item {
  flex: 1; text-align: center;
  background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 10px 4px;
}
.gmhs-icon { font-size: 18px; margin-bottom: 4px; }
.gmhs-label { font-size: 10px; color: var(--text-dim); margin-bottom: 2px; }
.gmhs-pillar { font-size: 11px; font-weight: 700; color: var(--gold); }
.gmhs-meaning { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* 일주 동물 카드 */
.ilju-animal-card {
  display: flex; align-items: center; gap: 16px;
  background: rgba(15,15,35,0.5);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 20px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.ilju-animal-img-wrap {
  width: 72px; height: 72px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
  border: 2px solid rgba(251,191,36,0.3);
}
.ilju-animal-img-wrap img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.ilju-animal-name {
  font-size: 20px; font-weight: 800; color: var(--gold);
  margin-bottom: 4px;
}
.ilju-animal-desc {
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
}

/* 오행별 동물 색상 필터 */
.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); }

/* MOBILE */
@media (max-width: 420px) {
  .hero-title { font-size: 26px; }
  .pillar-stem, .pillar-branch { font-size: 28px; }
  .personality-grid { grid-template-columns: 1fr; }
  .share-row { flex-direction: column; }
}
