절기 날짜 정밀화: - solarlunar 라이브러리 추가 - 천문학적 계산 기반 정확한 절기 날짜 계산 - 각 절기별 정확한 날짜 범위 검색 - 폴백 메커니즘으로 안정성 확보 AI 상세 해석 시스템: - ai-interpretation.ts 라이브러리 생성 - 일간 기반 성격 분석 (10개 천간별 상세 해석) - 오행 균형 분석 및 점수 계산 - 십성 기반 다차원 분석 - 직업 운세 (오행 + 십성 조합) - 대인 관계 (십성 기반) - 재물 운세 (정재/편재 분석) - 건강 운세 (오행 균형) - 맞춤형 조언 생성 결과 페이지 AI 해석 섹션: - 오행 균형 시각화 (막대 그래프) - 장점/주의할 점 구분 표시 - 4가지 운세 카드 (직업/대인/재물/건강) - AI 조언 그리드 레이아웃 - 전문가 상담 권장 안내 공유 기능 개선: - localhost 감지 로직 추가 - localhost인 경우: - 카카오톡: 텍스트 형식으로 사주 정보 공유 - 링크 복사: 사주 정보 텍스트 복사 - 사용자에게 개발 환경임을 안내 - 배포 환경: 기존대로 URL 공유 - 더 나은 사용자 경험 제공 기술 개선: - solarlunar 라이브러리 (정밀 절기 계산) - 타입 안전성 강화 - 모듈화된 해석 로직 - 성능 최적화 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
552 lines
26 KiB
TypeScript
552 lines
26 KiB
TypeScript
import { calculateSaju } from '@/lib/saju-calculator';
|
||
import Link from 'next/link';
|
||
import PDFButton from '../components/PDFButton';
|
||
import ShareButtons from '../components/ShareButtons';
|
||
import { calculateDaeun, getCurrentDaeun, getDaeunDescription } from '@/lib/daeun-calculator';
|
||
import { getCurrentSolarTerm, getSolarTermName, getSolarTermMonthBranch } from '@/lib/solar-terms';
|
||
import { EARTHLY_BRANCHES_KR } from '@/lib/saju-calculator';
|
||
import { generateInterpretation, calculateElementScore } from '@/lib/ai-interpretation';
|
||
|
||
interface PageProps {
|
||
searchParams: Promise<{
|
||
year: string;
|
||
month: string;
|
||
day: string;
|
||
hour?: string;
|
||
gender: 'male' | 'female';
|
||
calendarType: 'solar' | 'lunar';
|
||
}>;
|
||
}
|
||
|
||
export default async function ResultPage({ searchParams }: PageProps) {
|
||
const params = await searchParams;
|
||
const { year, month, day, hour, gender } = params;
|
||
|
||
const yearNum = parseInt(year);
|
||
const monthNum = parseInt(month);
|
||
const dayNum = parseInt(day);
|
||
const hourNum = hour ? parseInt(hour) : null;
|
||
|
||
const sajuData = calculateSaju(yearNum, monthNum, dayNum, hourNum, gender);
|
||
|
||
// 절기 정보
|
||
const solarTermIndex = getCurrentSolarTerm(yearNum, monthNum, dayNum);
|
||
const solarTermName = getSolarTermName(solarTermIndex);
|
||
const monthBranchIndex = getSolarTermMonthBranch(yearNum, monthNum, dayNum);
|
||
const monthBranchName = EARTHLY_BRANCHES_KR[monthBranchIndex];
|
||
|
||
// AI 해석 생성
|
||
const interpretation = generateInterpretation(sajuData);
|
||
const elementScores = calculateElementScore(sajuData);
|
||
|
||
// 대운 계산
|
||
const daeunList = calculateDaeun(
|
||
yearNum,
|
||
monthNum,
|
||
dayNum,
|
||
gender,
|
||
sajuData.month.stem,
|
||
sajuData.month.branch
|
||
);
|
||
const currentYear = new Date().getFullYear();
|
||
const currentDaeun = getCurrentDaeun(daeunList, currentYear);
|
||
|
||
return (
|
||
<div className="min-h-screen bg-gradient-to-br from-indigo-50 via-purple-50 to-pink-50">
|
||
{/* Navigation */}
|
||
<nav className="bg-white/80 backdrop-blur-md border-b border-gray-200 sticky top-0 z-50">
|
||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||
<div className="flex justify-between items-center h-16">
|
||
<Link href="/" className="text-2xl font-bold bg-gradient-to-r from-indigo-600 to-purple-600 bg-clip-text text-transparent">
|
||
🔮 사주보기
|
||
</Link>
|
||
<Link
|
||
href="/"
|
||
className="text-gray-700 hover:text-indigo-600 transition font-medium"
|
||
>
|
||
다시 보기
|
||
</Link>
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
{/* Result Content */}
|
||
<div id="pdf-content" className="max-w-6xl mx-auto px-4 py-12">
|
||
{/* Header */}
|
||
<div className="text-center mb-12">
|
||
<h1 className="text-4xl md:text-5xl font-bold text-gray-900 mb-4">
|
||
내 사주팔자
|
||
</h1>
|
||
<p className="text-xl text-gray-600">
|
||
{yearNum}년 {monthNum}월 {dayNum}일 {hourNum !== null && `${hourNum}시`}
|
||
{gender === 'male' ? ' 남성' : ' 여성'}
|
||
</p>
|
||
</div>
|
||
|
||
{/* 사주팔자 표 */}
|
||
<div className="bg-white rounded-3xl shadow-2xl p-8 md:p-12 mb-8">
|
||
<h2 className="text-3xl font-bold text-gray-900 mb-8 text-center">사주팔자 (四柱八字)</h2>
|
||
|
||
<div className="overflow-x-auto">
|
||
<table className="w-full border-collapse">
|
||
<thead>
|
||
<tr className="bg-gradient-to-r from-indigo-600 to-purple-600 text-white">
|
||
<th className="py-4 px-6 text-center font-bold text-lg">구분</th>
|
||
{sajuData.hour && <th className="py-4 px-6 text-center font-bold text-lg">시주 (時柱)</th>}
|
||
<th className="py-4 px-6 text-center font-bold text-lg">일주 (日柱)</th>
|
||
<th className="py-4 px-6 text-center font-bold text-lg">월주 (月柱)</th>
|
||
<th className="py-4 px-6 text-center font-bold text-lg">년주 (年柱)</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{/* 천간 */}
|
||
<tr className="border-b border-gray-200 hover:bg-indigo-50 transition">
|
||
<td className="py-4 px-6 text-center font-semibold text-gray-700">천간 (天干)</td>
|
||
{sajuData.hour && (
|
||
<td className="py-4 px-6 text-center">
|
||
<div className="text-3xl font-bold text-indigo-600">{sajuData.hour.stem}</div>
|
||
<div className="text-sm text-gray-600 mt-1">{sajuData.hour.stemKr}</div>
|
||
</td>
|
||
)}
|
||
<td className="py-4 px-6 text-center bg-blue-50">
|
||
<div className="text-3xl font-bold text-blue-600">{sajuData.day.stem}</div>
|
||
<div className="text-sm text-gray-600 mt-1">{sajuData.day.stemKr}</div>
|
||
<div className="text-xs text-blue-600 font-semibold mt-1">일간 (日干)</div>
|
||
</td>
|
||
<td className="py-4 px-6 text-center">
|
||
<div className="text-3xl font-bold text-indigo-600">{sajuData.month.stem}</div>
|
||
<div className="text-sm text-gray-600 mt-1">{sajuData.month.stemKr}</div>
|
||
</td>
|
||
<td className="py-4 px-6 text-center">
|
||
<div className="text-3xl font-bold text-indigo-600">{sajuData.year.stem}</div>
|
||
<div className="text-sm text-gray-600 mt-1">{sajuData.year.stemKr}</div>
|
||
</td>
|
||
</tr>
|
||
|
||
{/* 지지 */}
|
||
<tr className="border-b border-gray-200 hover:bg-purple-50 transition">
|
||
<td className="py-4 px-6 text-center font-semibold text-gray-700">지지 (地支)</td>
|
||
{sajuData.hour && (
|
||
<td className="py-4 px-6 text-center">
|
||
<div className="text-3xl font-bold text-purple-600">{sajuData.hour.branch}</div>
|
||
<div className="text-sm text-gray-600 mt-1">{sajuData.hour.branchKr}</div>
|
||
</td>
|
||
)}
|
||
<td className="py-4 px-6 text-center bg-blue-50">
|
||
<div className="text-3xl font-bold text-blue-600">{sajuData.day.branch}</div>
|
||
<div className="text-sm text-gray-600 mt-1">{sajuData.day.branchKr}</div>
|
||
</td>
|
||
<td className="py-4 px-6 text-center">
|
||
<div className="text-3xl font-bold text-purple-600">{sajuData.month.branch}</div>
|
||
<div className="text-sm text-gray-600 mt-1">{sajuData.month.branchKr}</div>
|
||
</td>
|
||
<td className="py-4 px-6 text-center">
|
||
<div className="text-3xl font-bold text-purple-600">{sajuData.year.branch}</div>
|
||
<div className="text-sm text-gray-600 mt-1">{sajuData.year.branchKr}</div>
|
||
</td>
|
||
</tr>
|
||
|
||
{/* 십성 */}
|
||
<tr className="border-b border-gray-200 hover:bg-emerald-50 transition">
|
||
<td className="py-4 px-6 text-center font-semibold text-gray-700">십성 (十星)</td>
|
||
{sajuData.hour && (
|
||
<td className="py-4 px-6 text-center">
|
||
<div className="text-lg font-semibold text-emerald-600">{sajuData.hour.tenGod}</div>
|
||
</td>
|
||
)}
|
||
<td className="py-4 px-6 text-center bg-blue-50">
|
||
<div className="text-lg font-semibold text-blue-600">{sajuData.day.tenGod}</div>
|
||
</td>
|
||
<td className="py-4 px-6 text-center">
|
||
<div className="text-lg font-semibold text-emerald-600">{sajuData.month.tenGod}</div>
|
||
</td>
|
||
<td className="py-4 px-6 text-center">
|
||
<div className="text-lg font-semibold text-emerald-600">{sajuData.year.tenGod}</div>
|
||
</td>
|
||
</tr>
|
||
|
||
{/* 십이운성 */}
|
||
<tr className="hover:bg-pink-50 transition">
|
||
<td className="py-4 px-6 text-center font-semibold text-gray-700">십이운성</td>
|
||
{sajuData.hour && (
|
||
<td className="py-4 px-6 text-center">
|
||
<div className="text-lg font-semibold text-pink-600">{sajuData.hour.fortune}</div>
|
||
</td>
|
||
)}
|
||
<td className="py-4 px-6 text-center bg-blue-50">
|
||
<div className="text-lg font-semibold text-blue-600">{sajuData.day.fortune}</div>
|
||
</td>
|
||
<td className="py-4 px-6 text-center">
|
||
<div className="text-lg font-semibold text-pink-600">{sajuData.month.fortune}</div>
|
||
</td>
|
||
<td className="py-4 px-6 text-center">
|
||
<div className="text-lg font-semibold text-pink-600">{sajuData.year.fortune}</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<div className="mt-6 space-y-3">
|
||
<div className="p-4 bg-blue-50 rounded-xl">
|
||
<p className="text-sm text-gray-700">
|
||
<strong className="text-blue-600">일간 (日干):</strong> {sajuData.day.stem}({sajuData.day.stemKr}) - 나 자신을 나타내는 중심 기둥입니다.
|
||
</p>
|
||
</div>
|
||
<div className="p-4 bg-green-50 rounded-xl">
|
||
<p className="text-sm text-gray-700">
|
||
<strong className="text-green-600">절기 (節氣):</strong> {solarTermName} 이후 -
|
||
월주는 절기를 기준으로 {monthBranchName}월입니다.
|
||
</p>
|
||
<p className="text-xs text-gray-600 mt-1">
|
||
* 사주 월주는 양력 월이 아닌 24절기를 기준으로 계산됩니다.
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
{/* 사주 해석 */}
|
||
<div className="grid md:grid-cols-2 gap-8 mb-8">
|
||
{/* 성격 */}
|
||
<div className="bg-white rounded-2xl shadow-lg p-8">
|
||
<h3 className="text-2xl font-bold text-gray-900 mb-4 flex items-center">
|
||
<span className="text-3xl mr-3">👤</span>
|
||
성격 특징
|
||
</h3>
|
||
<div className="space-y-3 text-gray-700">
|
||
<p className="leading-relaxed">
|
||
일간이 <strong className="text-indigo-600">{sajuData.day.stem}({sajuData.day.stemKr})</strong>인 사람은
|
||
{sajuData.day.element === '木' && ' 나무처럼 성장하고 발전하려는 의지가 강합니다. 창의적이고 진취적인 성향을 가지고 있습니다.'}
|
||
{sajuData.day.element === '火' && ' 불처럼 열정적이고 활동적입니다. 리더십이 있고 사교성이 뛰어납니다.'}
|
||
{sajuData.day.element === '土' && ' 흙처럼 안정적이고 신뢰감 있습니다. 포용력이 있고 책임감이 강합니다.'}
|
||
{sajuData.day.element === '金' && ' 금속처럼 강인하고 원칙적입니다. 결단력 있고 의리를 중시합니다.'}
|
||
{sajuData.day.element === '水' && ' 물처럼 유연하고 지혜롭습니다. 적응력이 뛰어나고 사려 깊습니다.'}
|
||
</p>
|
||
</div>
|
||
</div>
|
||
|
||
{/* 운세 */}
|
||
<div className="bg-white rounded-2xl shadow-lg p-8">
|
||
<h3 className="text-2xl font-bold text-gray-900 mb-4 flex items-center">
|
||
<span className="text-3xl mr-3">🌟</span>
|
||
운세 흐름
|
||
</h3>
|
||
<div className="space-y-3 text-gray-700">
|
||
<p className="leading-relaxed">
|
||
현재 십이운성이 <strong className="text-purple-600">{sajuData.day.fortune}</strong>으로,
|
||
{sajuData.day.fortune === '장생' && ' 새로운 시작과 성장의 시기입니다.'}
|
||
{sajuData.day.fortune === '목욕' && ' 정화와 준비의 시기입니다.'}
|
||
{sajuData.day.fortune === '관대' && ' 사회적으로 인정받는 시기입니다.'}
|
||
{sajuData.day.fortune === '건록' && ' 안정되고 왕성한 활동의 시기입니다.'}
|
||
{sajuData.day.fortune === '제왕' && ' 최고의 전성기를 맞이하는 시기입니다.'}
|
||
{sajuData.day.fortune === '쇠' && ' 조금씩 힘이 약해지는 시기입니다.'}
|
||
{sajuData.day.fortune === '병' && ' 어려움이 있을 수 있는 시기입니다.'}
|
||
{sajuData.day.fortune === '사' && ' 끝과 새 시작을 준비하는 시기입니다.'}
|
||
{sajuData.day.fortune === '묘' && ' 잠시 휴식이 필요한 시기입니다.'}
|
||
{sajuData.day.fortune === '절' && ' 극복과 인내가 필요한 시기입니다.'}
|
||
{sajuData.day.fortune === '태' && ' 새로운 기운이 싹트는 시기입니다.'}
|
||
{sajuData.day.fortune === '양' && ' 성장을 준비하는 시기입니다.'}
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
{/* AI 상세 해석 */}
|
||
<div className="bg-gradient-to-br from-purple-50 to-indigo-50 rounded-3xl shadow-2xl p-8 md:p-12 mb-8">
|
||
<h2 className="text-3xl font-bold text-gray-900 mb-2 text-center flex items-center justify-center">
|
||
<span className="text-4xl mr-3">🤖</span>
|
||
AI 상세 해석
|
||
</h2>
|
||
<p className="text-center text-gray-600 mb-8">사주 데이터 분석 기반 맞춤 해석</p>
|
||
|
||
{/* 오행 균형 */}
|
||
<div className="bg-white rounded-2xl p-6 mb-6">
|
||
<h3 className="text-xl font-bold text-gray-900 mb-4 flex items-center">
|
||
<span className="text-2xl mr-2">⚖️</span>
|
||
오행 균형
|
||
</h3>
|
||
<div className="grid grid-cols-5 gap-3">
|
||
{Object.entries(elementScores).map(([element, score]) => (
|
||
<div key={element} className="text-center">
|
||
<div className="text-2xl font-bold mb-1">{element}</div>
|
||
<div className="text-sm text-gray-600 mb-2">
|
||
{element === '木' && '목'}
|
||
{element === '火' && '화'}
|
||
{element === '土' && '토'}
|
||
{element === '金' && '금'}
|
||
{element === '水' && '수'}
|
||
</div>
|
||
<div className="w-full bg-gray-200 rounded-full h-2 mb-1">
|
||
<div
|
||
className={`h-2 rounded-full ${
|
||
element === sajuData.day.element
|
||
? 'bg-gradient-to-r from-indigo-500 to-purple-500'
|
||
: 'bg-gray-400'
|
||
}`}
|
||
style={{ width: `${score}%` }}
|
||
></div>
|
||
</div>
|
||
<div className="text-xs font-semibold text-gray-700">{score}%</div>
|
||
</div>
|
||
))}
|
||
</div>
|
||
</div>
|
||
|
||
{/* 장단점 */}
|
||
<div className="grid md:grid-cols-2 gap-6 mb-6">
|
||
<div className="bg-white rounded-2xl p-6">
|
||
<h3 className="text-xl font-bold text-gray-900 mb-4 flex items-center">
|
||
<span className="text-2xl mr-2">💪</span>
|
||
장점
|
||
</h3>
|
||
<ul className="space-y-2">
|
||
{interpretation.strengths.map((strength, i) => (
|
||
<li key={i} className="flex items-start text-gray-700">
|
||
<span className="text-green-600 mr-2">✓</span>
|
||
<span>{strength}</span>
|
||
</li>
|
||
))}
|
||
</ul>
|
||
</div>
|
||
|
||
<div className="bg-white rounded-2xl p-6">
|
||
<h3 className="text-xl font-bold text-gray-900 mb-4 flex items-center">
|
||
<span className="text-2xl mr-2">⚠️</span>
|
||
주의할 점
|
||
</h3>
|
||
<ul className="space-y-2">
|
||
{interpretation.weaknesses.map((weakness, i) => (
|
||
<li key={i} className="flex items-start text-gray-700">
|
||
<span className="text-orange-600 mr-2">!</span>
|
||
<span>{weakness}</span>
|
||
</li>
|
||
))}
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
{/* 직업, 대인관계, 재물, 건강 */}
|
||
<div className="grid md:grid-cols-2 gap-6">
|
||
{/* 직업 */}
|
||
<div className="bg-white rounded-2xl p-6">
|
||
<h3 className="text-xl font-bold text-gray-900 mb-4 flex items-center">
|
||
<span className="text-2xl mr-2">💼</span>
|
||
직업 운세
|
||
</h3>
|
||
<ul className="space-y-2">
|
||
{interpretation.career.map((item, i) => (
|
||
<li key={i} className="flex items-start text-gray-700 text-sm">
|
||
<span className="text-blue-600 mr-2">•</span>
|
||
<span>{item}</span>
|
||
</li>
|
||
))}
|
||
</ul>
|
||
</div>
|
||
|
||
{/* 대인관계 */}
|
||
<div className="bg-white rounded-2xl p-6">
|
||
<h3 className="text-xl font-bold text-gray-900 mb-4 flex items-center">
|
||
<span className="text-2xl mr-2">👥</span>
|
||
대인 관계
|
||
</h3>
|
||
<ul className="space-y-2">
|
||
{interpretation.relationships.map((item, i) => (
|
||
<li key={i} className="flex items-start text-gray-700 text-sm">
|
||
<span className="text-pink-600 mr-2">•</span>
|
||
<span>{item}</span>
|
||
</li>
|
||
))}
|
||
</ul>
|
||
</div>
|
||
|
||
{/* 재물 */}
|
||
<div className="bg-white rounded-2xl p-6">
|
||
<h3 className="text-xl font-bold text-gray-900 mb-4 flex items-center">
|
||
<span className="text-2xl mr-2">💰</span>
|
||
재물 운세
|
||
</h3>
|
||
<ul className="space-y-2">
|
||
{interpretation.wealth.map((item, i) => (
|
||
<li key={i} className="flex items-start text-gray-700 text-sm">
|
||
<span className="text-yellow-600 mr-2">•</span>
|
||
<span>{item}</span>
|
||
</li>
|
||
))}
|
||
</ul>
|
||
</div>
|
||
|
||
{/* 건강 */}
|
||
<div className="bg-white rounded-2xl p-6">
|
||
<h3 className="text-xl font-bold text-gray-900 mb-4 flex items-center">
|
||
<span className="text-2xl mr-2">🏥</span>
|
||
건강 운세
|
||
</h3>
|
||
<ul className="space-y-2">
|
||
{interpretation.health.map((item, i) => (
|
||
<li key={i} className="flex items-start text-gray-700 text-sm">
|
||
<span className="text-red-600 mr-2">•</span>
|
||
<span>{item}</span>
|
||
</li>
|
||
))}
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
{/* 조언 */}
|
||
<div className="bg-white rounded-2xl p-6 mt-6">
|
||
<h3 className="text-xl font-bold text-gray-900 mb-4 flex items-center">
|
||
<span className="text-2xl mr-2">💡</span>
|
||
AI의 조언
|
||
</h3>
|
||
<div className="grid md:grid-cols-2 gap-3">
|
||
{interpretation.advice.map((item, i) => (
|
||
<div key={i} className="flex items-start text-gray-700 text-sm bg-indigo-50 p-3 rounded-lg">
|
||
<span className="text-indigo-600 mr-2">→</span>
|
||
<span>{item}</span>
|
||
</div>
|
||
))}
|
||
</div>
|
||
</div>
|
||
|
||
<div className="mt-6 p-4 bg-purple-100 rounded-xl">
|
||
<p className="text-xs text-gray-700 text-center">
|
||
💡 AI 해석은 전통 사주 이론을 기반으로 생성되었습니다. 참고용으로 활용하시고,
|
||
중요한 결정은 전문가와 상담하시기 바랍니다.
|
||
</p>
|
||
</div>
|
||
</div>
|
||
|
||
{/* 대운 (大運) */}
|
||
<div className="bg-white rounded-3xl shadow-2xl p-8 md:p-12 mb-8">
|
||
<h2 className="text-3xl font-bold text-gray-900 mb-8 text-center">
|
||
🔄 대운 (大運) - 10년 주기 운세
|
||
</h2>
|
||
|
||
{/* 현재 대운 */}
|
||
{currentDaeun && (
|
||
<div className="bg-gradient-to-r from-indigo-500 to-purple-500 rounded-2xl p-6 mb-8 text-white">
|
||
<h3 className="text-2xl font-bold mb-4 text-center">현재 대운</h3>
|
||
<div className="text-center mb-4">
|
||
<div className="text-5xl font-bold mb-2">
|
||
{currentDaeun.stem}{currentDaeun.branch}
|
||
</div>
|
||
<div className="text-xl mb-2">
|
||
{currentDaeun.stemKr}{currentDaeun.branchKr}
|
||
</div>
|
||
<div className="text-lg opacity-90">
|
||
{currentDaeun.age}세 ~ {currentDaeun.age + 9}세 ({currentDaeun.startYear}년 ~ {currentDaeun.endYear}년)
|
||
</div>
|
||
</div>
|
||
<p className="text-center leading-relaxed">
|
||
{getDaeunDescription(currentDaeun, sajuData.day.stem)}
|
||
</p>
|
||
</div>
|
||
)}
|
||
|
||
{/* 전체 대운 목록 */}
|
||
<div className="grid md:grid-cols-2 lg:grid-cols-4 gap-4">
|
||
{daeunList.map((daeun, index) => {
|
||
const isCurrent = currentDaeun &&
|
||
daeun.startYear === currentDaeun.startYear &&
|
||
daeun.endYear === currentDaeun.endYear;
|
||
|
||
return (
|
||
<div
|
||
key={index}
|
||
className={`rounded-xl p-4 border-2 transition ${
|
||
isCurrent
|
||
? 'bg-indigo-50 border-indigo-400'
|
||
: 'bg-gray-50 border-gray-200 hover:border-indigo-300'
|
||
}`}
|
||
>
|
||
<div className="text-center">
|
||
<div className="text-3xl font-bold text-gray-900 mb-1">
|
||
{daeun.stem}{daeun.branch}
|
||
</div>
|
||
<div className="text-sm text-gray-600 mb-2">
|
||
{daeun.stemKr}{daeun.branchKr}
|
||
</div>
|
||
<div className="text-xs text-gray-500">
|
||
{daeun.age}세 ~ {daeun.age + 9}세
|
||
</div>
|
||
<div className="text-xs text-gray-400">
|
||
{daeun.startYear} ~ {daeun.endYear}
|
||
</div>
|
||
{isCurrent && (
|
||
<div className="mt-2">
|
||
<span className="inline-block bg-indigo-600 text-white text-xs px-3 py-1 rounded-full font-semibold">
|
||
현재
|
||
</span>
|
||
</div>
|
||
)}
|
||
</div>
|
||
</div>
|
||
);
|
||
})}
|
||
</div>
|
||
|
||
<div className="mt-6 p-4 bg-indigo-50 rounded-xl">
|
||
<p className="text-sm text-gray-700 mb-2">
|
||
<strong className="text-indigo-600">대운(大運):</strong> 10년 단위로 변화하는 큰 운의 흐름입니다.
|
||
각 대운마다 삶의 방향과 환경이 달라질 수 있으므로, 현재 대운의 특성을 이해하고 활용하는 것이 중요합니다.
|
||
</p>
|
||
{daeunList.length > 0 && (
|
||
<p className="text-xs text-gray-600">
|
||
* 대운은 생일부터 다음 절기까지의 일수를 기준으로 {daeunList[0].age}세부터 시작됩니다. (3일 = 1세)
|
||
</p>
|
||
)}
|
||
</div>
|
||
</div>
|
||
|
||
{/* 추가 기능 버튼 */}
|
||
<div className="grid md:grid-cols-2 lg:grid-cols-4 gap-6">
|
||
<Link
|
||
href={`/fortune?${new URLSearchParams(params as any).toString()}`}
|
||
className="bg-white rounded-xl p-6 shadow-lg hover:shadow-xl transition text-center group"
|
||
>
|
||
<div className="text-4xl mb-3">🌟</div>
|
||
<h3 className="text-xl font-bold text-gray-900 mb-2">오늘의 운세</h3>
|
||
<p className="text-gray-600 text-sm">오늘의 운을 확인하기</p>
|
||
</Link>
|
||
|
||
<Link
|
||
href="/compatibility"
|
||
className="bg-white rounded-xl p-6 shadow-lg hover:shadow-xl transition text-center group"
|
||
>
|
||
<div className="text-4xl mb-3">💕</div>
|
||
<h3 className="text-xl font-bold text-gray-900 mb-2">궁합 보기</h3>
|
||
<p className="text-gray-600 text-sm">두 사람의 궁합 확인</p>
|
||
</Link>
|
||
|
||
<PDFButton
|
||
elementId="pdf-content"
|
||
filename={`사주팔자_${yearNum}${monthNum}${dayNum}.pdf`}
|
||
buttonText="사주 PDF 저장"
|
||
/>
|
||
|
||
<ShareButtons
|
||
title={`내 사주팔자 - ${yearNum}년생 ${gender === 'male' ? '남성' : '여성'}`}
|
||
description={`일간: ${sajuData.day.stem}(${sajuData.day.stemKr}) | ${sajuData.day.element}`}
|
||
/>
|
||
</div>
|
||
</div>
|
||
|
||
{/* Footer */}
|
||
<footer className="bg-gray-900 text-white py-12 px-4 mt-20">
|
||
<div className="max-w-7xl mx-auto text-center">
|
||
<div className="text-2xl font-bold mb-4 bg-gradient-to-r from-indigo-400 to-purple-400 bg-clip-text text-transparent">
|
||
🔮 사주보기
|
||
</div>
|
||
<p className="text-gray-400 mb-6">
|
||
쟁승메이드가 제공하는 무료 사주 서비스
|
||
</p>
|
||
<div className="text-sm text-gray-500">
|
||
<p>문의: bgg8988@gmail.com | <a href="https://jaengseung-made.com" target="_blank" rel="noopener noreferrer" className="hover:text-indigo-400">쟁승메이드</a></p>
|
||
<p className="mt-2">© 2025 쟁승메이드. All rights reserved.</p>
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
</div>
|
||
);
|
||
}
|