/* ============================================================
   운세박스 — 다크 미스틱 밤하늘 컴포넌트 스타일
   styles.css 다음에 로드. 운세/사주 테마 + 페이지 컴포넌트.
   ============================================================ */

/* ---- CSS 변수 override (styles.css 에서 정의된 것들 확장) ---- */
:root {
  --bg:            #080c18;
  --bg-soft:       #0d1225;
  --bg-card:       rgba(15, 20, 45, 0.85);
  --bg-card-solid: #0f142d;
  --bg-deep:       #060911;
  --fg:            #e8e4f4;
  --fg-soft:       #b8b0d4;
  --fg-mute:       #7a7298;
  --accent:        #8b5cf6;
  --accent-hot:    #a78bfa;
  --accent-soft:   rgba(139, 92, 246, 0.15);
  --accent-deep:   #6d28d9;
  --gold:          #d4af37;
  --gold-bright:   #f5d060;
  --gold-soft:     rgba(212, 175, 55, 0.15);
  --border:        rgba(139, 92, 246, 0.22);
  --border-gold:   rgba(212, 175, 55, 0.3);
  --shadow-sm:     0 1px 4px rgba(0,0,0,0.4);
  --shadow:        0 4px 20px rgba(0,0,0,0.5);
  --shadow-hover:  0 8px 32px rgba(139, 92, 246, 0.28);
  --glow-purple:   0 0 20px rgba(139, 92, 246, 0.4);
  --glow-gold:     0 0 20px rgba(212, 175, 55, 0.35);
  --ink:           #f0ecff;
  --radius:        14px;
}

/* ---- 광고 슬롯 ---- */
.adslot-wrap {
  margin: 24px auto;
  max-width: 1000px;
  padding: 0 16px;
  text-align: center;
}
.adslot-wrap .adslot { min-height: 90px; }
.coupang-slot { margin: 24px auto; }

/* ---- 버튼 ---- */
.btn-primary,
.btn-ghost {
  display: inline-block;
  font-weight: 800;
  border-radius: 999px;
  padding: 13px 28px;
  font-size: 15px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
  border: none;
  text-align: center;
  letter-spacing: -0.01em;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  color: #fff;
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.4), 0 0 0 1px rgba(139,92,246,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 8px 28px rgba(109, 40, 217, 0.5), var(--glow-purple);
}
/* 금빛 primary 변형 (히어로 CTA 용) */
.btn-primary.btn-gold {
  background: linear-gradient(135deg, #b8860b, var(--gold), var(--gold-bright));
  color: #1a0e3a;
  box-shadow: 0 4px 16px rgba(212,175,55,0.4), 0 0 0 1px rgba(212,175,55,0.3);
}
.btn-primary.btn-gold:hover {
  transform: translateY(-2px);
  color: #1a0e3a;
  box-shadow: 0 8px 28px rgba(212,175,55,0.5), var(--glow-gold);
}
.btn-ghost {
  background: rgba(255,255,255,0.07);
  color: var(--fg);
  border: 1.5px solid rgba(139, 92, 246, 0.4);
}
.btn-ghost:hover {
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent-hot);
  border-color: var(--accent-hot);
}
.btn-lg { padding: 16px 36px; font-size: 16px; }

/* ================================================================
   히어로 — 풀블리드 밤하늘
   ================================================================ */
.hero--unse {
  background:
    radial-gradient(ellipse at 20% 15%,  rgba(109, 40, 217, 0.45) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 85%,  rgba(212, 175, 55, 0.2)  0%, transparent 40%),
    radial-gradient(ellipse at 60% 40%,  rgba(76, 29, 149, 0.3)   0%, transparent 50%),
    linear-gradient(180deg, rgba(8,10,28,0.72) 0%, rgba(6,8,20,0.80) 100%),
    url('/hero-bg.webp') center / cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 80px 16px 90px;
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 별 레이어 1 — 작은 별 다수 */
.hero--unse::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 8%  12%, rgba(255,255,255,0.9) 50%, transparent),
    radial-gradient(1.5px 1.5px at 14% 38%, rgba(255,255,255,0.7) 50%, transparent),
    radial-gradient(1px 1px at 22%  7%, rgba(255,255,255,0.8) 50%, transparent),
    radial-gradient(1.5px 1.5px at 31% 55%, rgba(245,208,96,0.8) 50%, transparent),
    radial-gradient(1px 1px at 38% 22%, rgba(255,255,255,0.7) 50%, transparent),
    radial-gradient(2px 2px at 46%  5%, rgba(255,255,255,0.9) 50%, transparent),
    radial-gradient(1px 1px at 52% 72%, rgba(167,139,250,0.9) 50%, transparent),
    radial-gradient(1.5px 1.5px at 59% 18%, rgba(255,255,255,0.8) 50%, transparent),
    radial-gradient(1px 1px at 65% 44%, rgba(255,255,255,0.7) 50%, transparent),
    radial-gradient(2px 2px at 71% 60%, rgba(245,208,96,0.7) 50%, transparent),
    radial-gradient(1px 1px at 78%  9%, rgba(255,255,255,0.9) 50%, transparent),
    radial-gradient(1.5px 1.5px at 84% 35%, rgba(255,255,255,0.8) 50%, transparent),
    radial-gradient(1px 1px at 90% 68%, rgba(167,139,250,0.8) 50%, transparent),
    radial-gradient(1px 1px at 96% 24%, rgba(255,255,255,0.7) 50%, transparent),
    radial-gradient(1.5px 1.5px at 4%  82%, rgba(255,255,255,0.8) 50%, transparent),
    radial-gradient(1px 1px at 27% 89%, rgba(245,208,96,0.6) 50%, transparent),
    radial-gradient(1px 1px at 43% 93%, rgba(255,255,255,0.7) 50%, transparent),
    radial-gradient(2px 2px at 73% 88%, rgba(255,255,255,0.9) 50%, transparent),
    radial-gradient(1px 1px at 88% 92%, rgba(167,139,250,0.7) 50%, transparent),
    radial-gradient(1.5px 1.5px at 18% 60%, rgba(255,255,255,0.6) 50%, transparent),
    radial-gradient(1px 1px at 55% 50%, rgba(245,208,96,0.5) 50%, transparent),
    radial-gradient(1px 1px at 3%  48%, rgba(255,255,255,0.7) 50%, transparent),
    radial-gradient(1.5px 1.5px at 97% 55%, rgba(167,139,250,0.6) 50%, transparent);
  pointer-events: none;
  animation: twinkle 6s ease-in-out infinite alternate;
}

/* 별 레이어 2 — 달/초승달 장식 */
.hero--unse::after {
  content: "🌙";
  position: absolute;
  top: 24px;
  right: clamp(40px, 8%, 120px);
  font-size: clamp(36px, 5vw, 56px);
  opacity: 0.85;
  filter: drop-shadow(0 0 16px rgba(245,208,96,0.6));
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

@keyframes twinkle {
  0%   { opacity: 0.6; }
  50%  { opacity: 1;   }
  100% { opacity: 0.75; }
}
@keyframes float {
  0%   { transform: translateY(0px) rotate(-5deg); }
  50%  { transform: translateY(-12px) rotate(3deg); }
  100% { transform: translateY(0px) rotate(-5deg); }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: var(--glow-gold); }
  50%       { box-shadow: 0 0 40px rgba(212,175,55,0.6); }
}

.hero-inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  z-index: 2;
}

/* 히어로 타이틀 — 명조 폰트 + 금빛 그라데이션 */
.hero--unse h1 {
  font-family: 'Noto Serif KR', 'Apple Myungjo', '나눔명조', Georgia, serif;
  font-size: clamp(30px, 6vw, 52px);
  font-weight: 900;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: linear-gradient(135deg, #ffffff 0%, var(--gold-bright) 50%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
  text-shadow: none;
}

.hero-sub {
  font-size: clamp(15px, 3.4vw, 18px);
  color: rgba(232, 228, 244, 0.85);
  line-height: 1.7;
  margin: 0 0 32px;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ================================================================
   메뉴 4종 카드
   ================================================================ */
.menu-grid-section {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 16px;
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.menu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative;
  overflow: hidden;
}
/* 카드 상단 glow 라인 */
.menu-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity .2s ease;
}
.menu-card:hover::before { opacity: 1; }
.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover), var(--glow-purple);
  border-color: var(--accent);
}
.menu-card-emoji {
  font-size: 36px;
  filter: drop-shadow(0 0 8px rgba(212,175,55,0.4));
}
.menu-card-name {
  font-family: 'Noto Serif KR', 'Apple Myungjo', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.menu-card-desc {
  font-size: 13px;
  color: var(--fg-soft);
  line-height: 1.6;
  flex: 1;
}
.menu-card-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  margin-top: 4px;
}

/* ================================================================
   섹션 공통
   ================================================================ */
.home-section {
  max-width: 1000px;
  margin: 44px auto;
  padding: 0 16px;
}
.section-title {
  font-family: 'Noto Serif KR', 'Apple Myungjo', serif;
  font-size: clamp(20px, 4.5vw, 26px);
  font-weight: 900;
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.section-sub {
  font-size: 14px;
  color: var(--fg-mute);
  margin: 0 0 20px;
}

/* 섹션 구분선 (별 장식) */
.section-divider {
  text-align: center;
  color: var(--fg-mute);
  margin: 40px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ================================================================
   띠/별자리 그리드 — 별자리판 느낌
   ================================================================ */
.zodiac-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.zodiac-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  backdrop-filter: blur(8px);
  transition: transform .15s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
/* 코너 별 장식 */
.zodiac-chip::after {
  content: '✦';
  position: absolute;
  top: 5px; right: 7px;
  font-size: 8px;
  color: var(--gold);
  opacity: 0;
  transition: opacity .18s ease;
}
.zodiac-chip:hover::after { opacity: 1; }
.zodiac-chip:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-hover), 0 0 12px rgba(139,92,246,0.2);
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.1);
}
.zodiac-chip-emoji {
  font-size: 32px;
  line-height: 1.2;
  filter: drop-shadow(0 0 6px rgba(212,175,55,0.3));
}
.zodiac-chip-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.zodiac-chip-years {
  font-size: 10.5px;
  color: var(--fg-mute);
}

/* ================================================================
   홈 CTA 박스
   ================================================================ */
.home-cta-section { max-width: 1000px; }
.home-cta-card {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(109, 40, 217, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(212, 175, 55, 0.15) 0%, transparent 60%),
    linear-gradient(135deg, #110a2e, #0d1225);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  padding: 48px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.home-cta-card::before {
  content: '✨';
  position: absolute;
  top: 16px; left: 22px;
  font-size: 20px;
  opacity: 0.6;
}
.home-cta-card::after {
  content: '✨';
  position: absolute;
  top: 16px; right: 22px;
  font-size: 20px;
  opacity: 0.6;
}
.home-cta-card h2 {
  font-family: 'Noto Serif KR', serif;
  font-size: 24px;
  font-weight: 900;
  margin: 0 0 10px;
  color: var(--ink);
}
.home-cta-card p {
  color: var(--fg-soft);
  margin: 0 0 22px;
  font-size: 15px;
}

/* ================================================================
   정적 페이지
   ================================================================ */
.static-page {
  max-width: 760px;
  margin: 40px auto;
  padding: 0 20px;
}
.static-page h1 {
  font-family: 'Noto Serif KR', serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--ink);
  margin: 0 0 18px;
}
.static-page h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--fg);
  margin: 28px 0 10px;
}
.static-page p { color: var(--fg-soft); line-height: 1.8; margin: 0 0 12px; }
.static-page ul { color: var(--fg-soft); line-height: 1.9; padding-left: 22px; }
.static-page a { color: var(--accent-hot); font-weight: 600; }

/* ================================================================
   전역 폼 컨트롤 — 다크 미스틱 테마 통일 스타일
   모든 select / input / checkbox / radio에 적용.
   iOS 16px 이상 유지 (줌 방지). 터치 타깃 최소 44px.
   ================================================================ */

/* ── 골드 드롭다운 화살표 SVG (url-encoded) ── */
:root {
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23d4af37' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ── select (모든 컨텍스트) ── */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-family: inherit;
  font-size: 16px; /* iOS 줌 방지 */
  padding: 11px 36px 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background-color: rgba(8, 12, 24, 0.85);
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: var(--fg);
  cursor: pointer;
  min-height: 44px; /* 터치 타깃 */
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  /* 비활성화 시 */
}
select:hover {
  border-color: rgba(139, 92, 246, 0.5);
  background-color: rgba(12, 16, 32, 0.9);
}
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18), 0 0 10px rgba(139, 92, 246, 0.12);
}
select:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
/* 옵션 목록 (브라우저 지원 범위 내 최대치) */
select option {
  background: #0d1225;
  color: var(--fg);
}
select option:checked {
  background: rgba(139, 92, 246, 0.3);
  color: var(--accent-hot);
}

/* ── input (text / number / date / email / tel) ── */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="tel"],
input[type="search"] {
  font-family: inherit;
  font-size: 16px; /* iOS 줌 방지 */
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: rgba(8, 12, 24, 0.85);
  color: var(--fg);
  min-height: 44px; /* 터치 타깃 */
  width: 100%;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="text"]::placeholder,
input[type="number"]::placeholder,
input[type="date"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
input[type="search"]::placeholder {
  color: var(--fg-mute);
  opacity: 1;
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18), 0 0 10px rgba(212, 175, 55, 0.1);
}
input[type="text"]:disabled,
input[type="number"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── 체크박스 ── */
input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid rgba(139, 92, 246, 0.5);
  border-radius: 5px;
  background: rgba(8, 12, 24, 0.85);
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
  flex-shrink: 0;
}
input[type="checkbox"]:hover {
  border-color: var(--accent);
}
input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.35);
}
input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22);
}

/* ── 라디오 ── */
input[type="radio"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid rgba(139, 92, 246, 0.5);
  border-radius: 50%;
  background: rgba(8, 12, 24, 0.85);
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
  flex-shrink: 0;
}
input[type="radio"]:hover {
  border-color: var(--accent);
}
input[type="radio"]:checked {
  border-color: var(--gold);
  background: rgba(8, 12, 24, 0.85);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}
input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
}
input[type="radio"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* ── 세그먼트 버튼 안의 라디오는 숨김 (saju-segment 패턴) ── */
.saju-segment input[type="radio"],
.saju-segment input[type="checkbox"] {
  /* 숨김 처리 — saju-segment label이 시각적 역할 수행 */
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

/* ================================================================
   섹션 히어로 배경 이미지 — 각 섹션별 AI 생성 배경
   .fortune-hero 및 .saju-intro 에 section-specific 클래스로 적용
   ================================================================ */

/* 공통 히어로 배경 믹스인 패턴 */
.section-hero-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 사주 히어로 */
.saju-intro--hero {
  background:
    radial-gradient(ellipse at 25% 40%, rgba(109, 40, 217, 0.35) 0%, transparent 45%),
    radial-gradient(ellipse at 75% 60%, rgba(212, 175, 55, 0.15) 0%, transparent 40%),
    linear-gradient(180deg, rgba(8,10,28,0.45) 0%, rgba(6,8,20,0.60) 100%),
    url('/hero/saju.webp') center / cover no-repeat;
  max-width: 100%;
  margin: 0 auto 12px;
  padding: 72px 16px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.saju-intro--hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.85) 50%, transparent),
    radial-gradient(1.5px 1.5px at 78% 12%, rgba(245,208,96,0.8) 50%, transparent),
    radial-gradient(1px 1px at 45% 70%, rgba(255,255,255,0.65) 50%, transparent),
    radial-gradient(1px 1px at 62% 38%, rgba(167,139,250,0.75) 50%, transparent),
    radial-gradient(1.5px 1.5px at 28% 55%, rgba(255,255,255,0.6) 50%, transparent),
    radial-gradient(2px 2px at 88% 75%, rgba(245,208,96,0.65) 50%, transparent),
    radial-gradient(1px 1px at 5% 85%, rgba(255,255,255,0.7) 50%, transparent),
    radial-gradient(1.5px 1.5px at 93% 30%, rgba(167,139,250,0.6) 50%, transparent);
  pointer-events: none;
  opacity: 0.7;
  animation: twinkle 7s ease-in-out infinite alternate;
}

/* 궁합 히어로 */
.gh-hero--bg {
  background:
    radial-gradient(ellipse at 30% 45%, rgba(109, 40, 217, 0.32) 0%, transparent 45%),
    radial-gradient(ellipse at 70% 55%, rgba(212, 175, 55, 0.18) 0%, transparent 40%),
    linear-gradient(180deg, rgba(8,10,28,0.45) 0%, rgba(6,8,20,0.60) 100%),
    url('/hero/gunghap.webp') center / cover no-repeat;
  position: relative;
  overflow: hidden;
  padding: 64px 16px 72px;
  max-width: 100%;
  margin: 0 auto 4px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.gh-hero--bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 15% 20%, rgba(245,208,96,0.8) 50%, transparent),
    radial-gradient(1px 1px at 80% 15%, rgba(255,255,255,0.75) 50%, transparent),
    radial-gradient(1px 1px at 50% 72%, rgba(167,139,250,0.7) 50%, transparent),
    radial-gradient(2px 2px at 35% 60%, rgba(255,255,255,0.6) 50%, transparent),
    radial-gradient(1px 1px at 90% 70%, rgba(245,208,96,0.65) 50%, transparent);
  pointer-events: none;
  opacity: 0.65;
  animation: twinkle 8s ease-in-out infinite alternate;
}

/* 타로 히어로 — tarot-stage 상단에 배경 이미지 주입 */
.tarot-stage--bg {
  background-image:
    url('/hero/tarot.webp');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

/* 오늘 / 주간 운세 히어로 — 각 배경 이미지 */
.fortune-hero--today {
  background:
    radial-gradient(ellipse at 25% 40%, rgba(109, 40, 217, 0.28) 0%, transparent 50%),
    radial-gradient(ellipse at 78% 65%, rgba(212, 175, 55, 0.15) 0%, transparent 45%),
    linear-gradient(180deg, rgba(12,10,34,0.45) 0%, rgba(8,12,24,0.62) 100%),
    url('/hero/today.webp') center / cover no-repeat !important;
}
.fortune-hero--week {
  background:
    radial-gradient(ellipse at 25% 40%, rgba(109, 40, 217, 0.28) 0%, transparent 50%),
    radial-gradient(ellipse at 78% 65%, rgba(212, 175, 55, 0.15) 0%, transparent 45%),
    linear-gradient(180deg, rgba(12,10,34,0.45) 0%, rgba(8,12,24,0.62) 100%),
    url('/hero/week.webp') center / cover no-repeat !important;
}
.fortune-hero--tti {
  background:
    radial-gradient(ellipse at 25% 40%, rgba(109, 40, 217, 0.28) 0%, transparent 50%),
    radial-gradient(ellipse at 78% 65%, rgba(212, 175, 55, 0.15) 0%, transparent 45%),
    linear-gradient(180deg, rgba(12,10,34,0.45) 0%, rgba(8,12,24,0.62) 100%),
    url('/hero/tti.webp') center / cover no-repeat !important;
}
.fortune-hero--star {
  background:
    radial-gradient(ellipse at 25% 40%, rgba(109, 40, 217, 0.28) 0%, transparent 50%),
    radial-gradient(ellipse at 78% 65%, rgba(212, 175, 55, 0.15) 0%, transparent 45%),
    linear-gradient(180deg, rgba(12,10,34,0.45) 0%, rgba(8,12,24,0.62) 100%),
    url('/hero/star.webp') center / cover no-repeat !important;
}

/* ================================================================
   사주 계산기 — 입력폼
   ================================================================ */
.saju-intro {
  max-width: 720px;
  margin: 40px auto 12px;
  padding: 0 16px;
  text-align: center;
}
.saju-intro h1 {
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(24px, 5.5vw, 34px);
  font-weight: 900;
  color: var(--ink);
  margin: 0 0 12px;
}
.saju-intro p { color: var(--fg-soft); line-height: 1.7; margin: 0; }
/* 히어로 배경 위 텍스트 — 밝아진 오버레이 보완용 그림자 */
.saju-intro--hero h1 {
  text-shadow: 0 2px 16px rgba(0,0,0,0.85), 0 1px 4px rgba(0,0,0,0.7);
}
.saju-intro--hero p {
  text-shadow: 0 1px 10px rgba(0,0,0,0.9);
}

.saju-form {
  max-width: 560px;
  margin: 24px auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: var(--shadow), var(--glow-purple);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.saju-field { margin-bottom: 20px; }
.saju-field > label {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--gold-bright);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.saju-row { display: flex; gap: 10px; flex-wrap: wrap; }
/* saju-form 내 select/input — 전역 규칙 위에 폼 레이아웃 조정만 */
.saju-form select,
.saju-form input[type="number"],
.saju-form input[type="text"] {
  flex: 1;
  min-width: 0;
  font-size: 15px; /* 이 폼은 15px 유지 (레이아웃상 좁음) */
}
.saju-form select:focus,
.saju-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.saju-segment { display: flex; gap: 8px; flex-wrap: wrap; }
.saju-segment label {
  flex: 1;
  min-width: 90px;
  text-align: center;
  padding: 10px 8px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--fg-soft);
  cursor: pointer;
  transition: all .12s ease;
  background: transparent;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.saju-segment label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-hot);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.2);
}
.saju-hint { font-size: 12px; color: var(--fg-mute); margin: 6px 0 0; line-height: 1.6; }
.saju-submit { width: 100%; margin-top: 10px; }
.saju-error { color: #f87171; font-size: 13px; font-weight: 700; margin: 10px 0 0; }

/* ================================================================
   사주 결과
   ================================================================ */
.saju-result {
  max-width: 900px;
  margin: 32px auto;
  padding: 0 16px;
}
.saju-result-hero {
  background:
    radial-gradient(ellipse at 30% 50%, rgba(109,40,217,0.4) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 30%, rgba(212,175,55,0.2) 0%, transparent 45%),
    linear-gradient(160deg, #120a2e, #0d1225);
  border: 1px solid var(--border-gold);
  color: #fff;
  border-radius: 20px;
  padding: 36px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* 결과 히어로 별 배경 */
.saju-result-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 15% 25%, rgba(255,255,255,0.8) 50%, transparent),
    radial-gradient(1.5px 1.5px at 75% 15%, rgba(245,208,96,0.7) 50%, transparent),
    radial-gradient(1px 1px at 55% 70%, rgba(255,255,255,0.6) 50%, transparent),
    radial-gradient(1px 1px at 30% 80%, rgba(167,139,250,0.7) 50%, transparent),
    radial-gradient(1.5px 1.5px at 88% 60%, rgba(255,255,255,0.6) 50%, transparent);
  pointer-events: none;
}
.saju-result-hero h1 {
  font-family: 'Noto Serif KR', serif;
  font-size: 24px;
  font-weight: 900;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #fff, var(--gold-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}
.saju-result-hero .saju-birth {
  color: var(--fg-soft);
  font-size: 14px;
  position: relative;
}

/* 사주팔자 4기둥 표 */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.pillar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pillar:hover {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212,175,55,0.2);
}
.pillar-label {
  background: linear-gradient(135deg, rgba(109,40,217,0.4), rgba(109,40,217,0.2));
  border-bottom: 1px solid var(--border);
  color: var(--accent-hot);
  font-size: 12.5px;
  font-weight: 800;
  padding: 8px 4px;
  letter-spacing: 0.02em;
}
.pillar-gz { padding: 16px 4px 6px; }
.pillar-han {
  font-family: 'Noto Serif KR', serif;
  font-size: 36px;
  font-weight: 900;
  color: var(--gold-bright);
  line-height: 1.15;
  text-shadow: 0 0 12px rgba(212,175,55,0.4);
}
.pillar-kr {
  font-size: 13px;
  color: var(--fg-soft);
  font-weight: 700;
}
.pillar-el {
  font-size: 11.5px;
  color: var(--fg-mute);
  padding: 6px 4px 14px;
  line-height: 1.6;
}

/* 오행 분포 막대 */
.ohaeng { margin: 22px 0; }
.ohaeng-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ohaeng-name {
  width: 56px;
  font-size: 13px;
  font-weight: 800;
  color: var(--fg);
}
.ohaeng-bar-bg {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  height: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}
.ohaeng-bar {
  height: 100%;
  border-radius: 999px;
  transition: width .6s cubic-bezier(0.4, 0, 0.2, 1);
}
/* 오행 색상 — 다크 배경에 맞게 채도 조정, 클래스명 유지 */
.ohaeng-bar.el-목 { background: linear-gradient(90deg, #2d8a52, #4ade80); box-shadow: 0 0 8px rgba(74,222,128,0.3); }
.ohaeng-bar.el-화 { background: linear-gradient(90deg, #b91c1c, #f87171); box-shadow: 0 0 8px rgba(248,113,113,0.3); }
.ohaeng-bar.el-토 { background: linear-gradient(90deg, #a16207, var(--gold)); box-shadow: 0 0 8px rgba(212,175,55,0.3); }
.ohaeng-bar.el-금 { background: linear-gradient(90deg, #6b7280, #e2e8f0); box-shadow: 0 0 8px rgba(226,232,240,0.2); }
.ohaeng-bar.el-수 { background: linear-gradient(90deg, #1e40af, #60a5fa); box-shadow: 0 0 8px rgba(96,165,250,0.3); }
.ohaeng-count {
  width: 28px;
  font-size: 13px;
  font-weight: 700;
  color: var(--fg-soft);
  text-align: right;
}

/* 풀이 카드 */
.saju-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 22px;
  margin: 18px 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color .2s ease;
}
.saju-card:hover { border-color: rgba(139,92,246,0.4); }
.saju-card h2 {
  font-family: 'Noto Serif KR', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.saju-card p { color: var(--fg-soft); line-height: 1.88; margin: 0 0 10px; }
.saju-term {
  border-bottom: 2px dotted var(--gold);
  cursor: help;
  font-weight: 700;
  color: var(--gold-bright);
  transition: color .12s ease;
}
.saju-term:hover { color: var(--gold); }

/* ================================================================
   띠별 / 별자리 운세 콘텐츠 페이지
   ================================================================ */
.fortune-hero {
  background:
    radial-gradient(ellipse at 25% 40%, rgba(109, 40, 217, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 78% 65%, rgba(212, 175, 55, 0.18) 0%, transparent 45%),
    linear-gradient(180deg, #0c0a22 0%, #080c18 100%);
  color: #fff;
  text-align: center;
  padding: 56px 16px 60px;
  position: relative;
  overflow: hidden;
}
/* fortune-hero 별 배경 */
.fortune-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.8) 50%, transparent),
    radial-gradient(1.5px 1.5px at 85% 15%, rgba(245,208,96,0.7) 50%, transparent),
    radial-gradient(1px 1px at 40% 75%, rgba(255,255,255,0.6) 50%, transparent),
    radial-gradient(1px 1px at 65% 40%, rgba(167,139,250,0.7) 50%, transparent),
    radial-gradient(1.5px 1.5px at 25% 60%, rgba(255,255,255,0.5) 50%, transparent),
    radial-gradient(1px 1px at 92% 75%, rgba(255,255,255,0.6) 50%, transparent),
    radial-gradient(2px 2px at 50% 10%, rgba(245,208,96,0.6) 50%, transparent);
  pointer-events: none;
  opacity: 0.8;
}
.fortune-hero-emoji {
  font-size: 64px;
  line-height: 1;
  position: relative;
  filter: drop-shadow(0 0 16px rgba(212,175,55,0.5));
  animation: float 8s ease-in-out infinite;
  text-shadow: 0 2px 16px rgba(0,0,0,0.7);
}
.fortune-hero h1 {
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(26px, 5.5vw, 36px);
  font-weight: 900;
  margin: 14px 0 6px;
  background: linear-gradient(135deg, #fff 30%, var(--gold-bright) 70%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.8));
}
.fortune-hero h2 {
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(22px, 4.5vw, 30px);
  font-weight: 900;
  margin: 14px 0 6px;
  color: var(--ink);
  position: relative;
  text-shadow: 0 2px 12px rgba(0,0,0,0.8), 0 1px 4px rgba(0,0,0,0.6);
}
.fortune-hero-meta {
  color: var(--fg-soft);
  font-size: 13.5px;
  position: relative;
  text-shadow: 0 1px 8px rgba(0,0,0,0.9);
}
.fortune-summary {
  color: rgba(232, 228, 244, 0.9);
  font-size: 15px;
  line-height: 1.7;
  max-width: 600px;
  margin: 12px auto 0;
  position: relative;
  text-shadow: 0 1px 10px rgba(0,0,0,0.85);
}
/* fortune-hero 내 .fortune-summary (오버랩 없음 — 새 위치) */
.fortune-hero > .fortune-summary {
  margin-top: 14px;
}

.fortune-body {
  max-width: 760px;
  margin: 28px auto;
  padding: 0 16px;
}
.fortune-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 22px;
  margin: 14px 0;
  backdrop-filter: blur(8px);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.fortune-section:hover {
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: var(--shadow-sm), 0 0 10px rgba(139,92,246,0.1);
}
.fortune-section h2 {
  font-family: 'Noto Serif KR', serif;
  font-size: 17.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fortune-section h3 {
  font-family: 'Noto Serif KR', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fortune-section p { color: var(--fg-soft); line-height: 1.88; margin: 0; }

.fortune-traits { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 0; }
.fortune-trait {
  background: var(--accent-soft);
  color: var(--accent-hot);
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.fortune-lucky {
  max-width: 760px;
  margin: 24px auto;
  padding: 0 16px;
}
.fortune-lucky-item {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 13.5px;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fortune-lucky-item b,
.fortune-lucky-item strong {
  display: block;
  color: var(--gold-bright);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 2px;
}
.fortune-lucky-item span { color: var(--fg-mute); font-size: 12px; }

.fortune-more { max-width: 1000px; margin: 32px auto; padding: 0 16px; }

/* 공유 버튼 */
.share-box {
  text-align: center;
  margin: 30px auto;
  max-width: 760px;
  padding: 0 16px;
}
.share-box h3 {
  font-family: 'Noto Serif KR', serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 14px;
}
.share-box h2 {
  font-family: 'Noto Serif KR', serif;
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 12px;
}
.share-box p { color: var(--fg-soft); margin: 0 0 14px; font-size: 14px; }
.share-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.share-buttons button {
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--fg-soft);
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s ease;
  backdrop-filter: blur(8px);
}
.share-buttons button:hover {
  border-color: var(--accent);
  color: var(--accent-hot);
  box-shadow: 0 0 10px rgba(139,92,246,0.2);
}

/* ================================================================
   AntiAdblock 모달 — 다크 테마
   ================================================================ */

/* ---- 반응형 ---- */
@media (max-width: 760px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .zodiac-grid { grid-template-columns: repeat(3, 1fr); }
  .pillars { gap: 7px; }
  .pillar-han { font-size: 28px; }
  .fortune-lucky { grid-template-columns: 1fr; }
  .hero--unse { padding: 60px 16px 70px; min-height: 380px; }
  .saju-form { padding: 24px 18px; }
  .home-cta-card { padding: 36px 18px; }
}
@media (max-width: 480px) {
  .menu-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .zodiac-grid { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .zodiac-chip { padding: 12px 6px; }
  .zodiac-chip-emoji { font-size: 26px; }
  .zodiac-chip-name { font-size: 12px; }
}
@media (max-width: 380px) {
  .zodiac-grid { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
}

/* ================================================================
   별 배경 애니메이션 — body 전체 (미묘한 성운 효과)
   ================================================================ */
@keyframes nebula-pulse {
  0%, 100% { opacity: 0.08; }
  50%       { opacity: 0.14; }
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(ellipse 800px 600px at 10%  20%, rgba(76, 29, 149, 0.1) 0%, transparent 70%),
    radial-gradient(ellipse 600px 800px at 90%  80%, rgba(30, 27, 75, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 400px 400px at 50%  50%, rgba(109, 40, 217, 0.04) 0%, transparent 70%);
  animation: nebula-pulse 12s ease-in-out infinite;
}

/* ================================================================
   테이블 다크 스타일 (star/index 등)
   ================================================================ */
table {
  color: var(--fg);
}
table thead tr {
  background: linear-gradient(135deg, var(--accent-deep), var(--accent)) !important;
  color: #fff !important;
}
table tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.03) !important;
}
table td, table th {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
table a { color: var(--accent-hot) !important; }

/* star/tti index 의 원소 카드 */
.fortune-body [style*="background:var(--bg-card"] {
  background: var(--bg-card) !important;
  border: 1px solid var(--border);
  border-radius: 14px;
}

/* ================================================================
   스크롤바 스타일
   ================================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.4);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ================================================================
   fortune-lucky 내 항목 (today 페이지 인라인 스타일 override)
   ================================================================ */
.fortune-lucky > div {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

/* ================================================================
   하단 앵커 광고 바 (sticky anchor ad)
   ================================================================ */
#anchor-ad-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(8, 12, 24, 0.97);
  border-top: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.55), 0 -1px 0 rgba(139, 92, 246, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 6px 40px 6px 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
#anchor-ad-bar .anchor-ad-inner {
  flex: 1;
  text-align: center;
  max-width: 728px;
}
#anchor-ad-close {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: var(--fg-soft);
  font-size: 16px;
  line-height: 1;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .15s ease, color .15s ease;
  flex-shrink: 0;
}
#anchor-ad-close:hover {
  background: rgba(139, 92, 246, 0.35);
  color: var(--accent-hot);
}
/* body 패딩 — 앵커 바가 콘텐츠 가리지 않도록 */
body.has-anchor-ad {
  padding-bottom: 72px;
}
@media (max-width: 760px) {
  #anchor-ad-bar {
    padding: 4px 36px 4px 4px;
    min-height: 54px;
  }
  body.has-anchor-ad {
    padding-bottom: 72px;
  }
}
