/* ========================================
   사주 페이지 스타일
   입력폼 + 사주팔자 시각화 + 오행 차트
   ======================================== */

.saju-page {
  padding-top: 80px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.saju-page .section-title,
.saju-page .section-desc {
  text-align: center;
}

/* 입력 폼 */
.saju-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
  position: relative;
  background: rgba(20, 22, 30, 0.4);
  border: 1px solid rgba(205, 170, 80, 0.12);
  border-radius: 20px;
  backdrop-filter: blur(5px);
}

/* 폼 상단 장식선 */
.saju-form::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230, 190, 70, 0.5), transparent);
}

/* 폼 하단 장식선 */
.saju-form::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230, 190, 70, 0.3), transparent);
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.form-group {
  flex: 1;
}

.form-group label {
  display: block;
  color: var(--gray);
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(20, 22, 30, 0.8);
  border: 1px solid rgba(205, 170, 80, 0.25);
  border-radius: 10px;
  color: var(--white);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: rgba(230, 190, 70, 0.6);
  box-shadow: 0 0 12px rgba(230, 190, 70, 0.15), inset 0 0 8px rgba(230, 190, 70, 0.05);
}

.form-group input::placeholder {
  color: rgba(160, 152, 144, 0.5);
}

.form-group select option {
  background: #1a1c26;
  color: var(--white);
}

.gender-btns {
  display: flex;
  gap: 0.5rem;
}

.gender-btn, .calendar-btn {
  flex: 1;
  padding: 0.75rem;
  background: rgba(20, 22, 30, 0.8);
  border: 1px solid rgba(205, 170, 80, 0.2);
  border-radius: 10px;
  color: var(--gray);
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.gender-btn:hover, .calendar-btn:hover {
  border-color: rgba(205, 170, 80, 0.4);
  background: rgba(205, 170, 80, 0.05);
}

.gender-btn.active, .calendar-btn.active {
  border: 1.5px solid rgba(230, 190, 70, 0.6);
  background: linear-gradient(145deg, rgba(205, 170, 80, 0.12) 0%, rgba(180, 140, 50, 0.06) 100%);
  color: transparent;
  background-clip: text, padding-box;
  -webkit-background-clip: text, padding-box;
  color: var(--gold);
  box-shadow: 0 0 12px rgba(230, 190, 70, 0.12), inset 0 1px 0 rgba(255, 235, 150, 0.15);
  text-shadow: 0 0 8px rgba(230, 190, 70, 0.3);
}

/* 양각(엠보싱) 효과 */
.gender-btn.active, .calendar-btn.active {
  background: linear-gradient(145deg, rgba(205, 170, 80, 0.15) 0%, rgba(160, 130, 50, 0.06) 100%);
  border-top-color: rgba(255, 235, 150, 0.4);
  border-left-color: rgba(255, 235, 150, 0.3);
  border-bottom-color: rgba(140, 110, 40, 0.4);
  border-right-color: rgba(140, 110, 40, 0.3);
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.btn-full {
  width: 100%;
  margin-top: 0.5rem;
  padding: 1rem;
  font-size: 1.1rem;
}

/* 사주 섹션 타이틀 메탈릭 골드 */
.saju-page .section-title {
  background: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(212, 168, 67, 0.3));
}

/* 사주 결과 제목 메탈릭 골드 */
.oheng-chart h3 {
  background: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 사주팔자 차트 */
.saju-chart {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.5rem auto 2rem;
  max-width: 500px;
  padding: 0 1rem;
}

.pillar {
  text-align: center;
  flex: 1;
  max-width: 100px;
}

.pillar-label {
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 0.5rem;
}

.pillar-gan, .pillar-ji {
  width: 70px;
  height: 70px;
  margin: 0 auto 0.3rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  transition: all 0.6s ease;
}

.pillar-gan {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: var(--gold);
}

.pillar-ji {
  background: rgba(205, 170, 80, 0.06);
  border: 1px solid rgba(205, 170, 80, 0.2);
  color: var(--light-purple);
}

.pillar-gan.highlight {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  background: rgba(255, 215, 0, 0.15);
}

.pillar-sipseong {
  font-size: 0.7rem;
  color: var(--gray);
  margin-top: 0.3rem;
}

/* 오행 색상 */
.oheng-wood { color: #4ade80 !important; border-color: #4ade80 !important; }
.oheng-fire { color: #f87171 !important; border-color: #f87171 !important; }
.oheng-earth { color: #fbbf24 !important; border-color: #fbbf24 !important; }
.oheng-metal { color: #e2e8f0 !important; border-color: #e2e8f0 !important; }
.oheng-water { color: #60a5fa !important; border-color: #60a5fa !important; }

/* 사주 기본 정보 */
.saju-info {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.saju-info-item {
  background: var(--card-bg);
  border: 1px solid rgba(205, 170, 80, 0.15);
  border-radius: 10px;
  padding: 0.8rem 1.2rem;
  text-align: center;
}

.saju-info-item .label {
  font-size: 0.75rem;
  color: var(--gray);
  margin-bottom: 0.2rem;
}

.saju-info-item .value {
  font-size: 1rem;
  color: var(--gold);
  font-weight: 600;
}

/* 오행 차트 */
.oheng-chart {
  max-width: 500px;
  margin: 0 auto 2rem;
  background: var(--card-bg);
  border: 1px solid rgba(205, 170, 80, 0.15);
  border-radius: 16px;
  padding: 1.5rem;
}

.oheng-chart h3 {
  text-align: center;
  color: var(--gold);
  margin-bottom: 1.2rem;
  font-size: 1rem;
}

.oheng-bar-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.8rem;
  gap: 0.8rem;
}

.oheng-label {
  width: 60px;
  font-size: 0.85rem;
  text-align: right;
}

.oheng-bar-bg {
  flex: 1;
  height: 24px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.oheng-bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 1s ease;
  width: 0;
}

.oheng-bar-fill.wood { background: linear-gradient(90deg, #22c55e, #4ade80); }
.oheng-bar-fill.fire { background: linear-gradient(90deg, #ef4444, #f87171); }
.oheng-bar-fill.earth { background: linear-gradient(90deg, #d97706, #fbbf24); }
.oheng-bar-fill.metal { background: linear-gradient(90deg, #94a3b8, #e2e8f0); }
.oheng-bar-fill.water { background: linear-gradient(90deg, #3b82f6, #60a5fa); }

.oheng-count {
  width: 30px;
  font-size: 0.9rem;
  color: var(--white);
  font-weight: 600;
}

/* 분석 결과 */
.result-interpretation {
  max-width: 700px;
  margin: 0 auto 2rem;
  background: var(--card-bg);
  border: 1px solid rgba(205, 170, 80, 0.15);
  border-radius: 16px;
  padding: 2rem;
  line-height: 1.9;
  white-space: pre-wrap;
  font-size: 0.95rem;
  color: var(--white);
}

.loading-spinner { text-align: center; padding: 2rem; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255, 215, 0, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-spinner p { color: var(--gray); font-size: 0.9rem; }

.result-actions {
  display: flex; justify-content: center; gap: 1rem;
  margin-bottom: 3rem; flex-wrap: wrap; padding: 0 1rem;
}

.cross-links { border-top: 1px solid rgba(205, 170, 80, 0.12); padding: 2rem 1rem 0; max-width: 700px; margin: 0 auto; }
.cross-links h3 { text-align: center; color: var(--gray); font-size: 1rem; margin-bottom: 1rem; }
.cross-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.cross-card { background: var(--card-bg); border: 1px solid rgba(205, 170, 80, 0.12); border-radius: 12px; padding: 1.2rem; text-align: center; text-decoration: none; transition: all 0.3s; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cross-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.cross-card span { font-size: 1.5rem; display: block; margin-bottom: 0.5rem; }
.cross-card p { color: var(--gray); font-size: 0.85rem; }

/* 모바일 */
@media (max-width: 768px) {
  .form-row { flex-direction: column; gap: 0.8rem; }
  .saju-chart { gap: 0.4rem; }
  .pillar-gan, .pillar-ji { width: 55px; height: 55px; font-size: 1.4rem; }
}
