ZIP/WAREHOUSE/today_mouse.php
<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>1972년생 쥐띠 오늘의 운세</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@300;500;700&family=Noto+Sans+KR:wght@300;400;700&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Noto Sans KR', sans-serif;
            background-color: #111827;
            color: #e5e7eb;
            overflow-x: hidden;
        }
        .serif {
            font-family: 'Noto Serif KR', serif;
        }
        .bg-pattern {
            background-image: radial-gradient(#374151 1px, transparent 1px);
            background-size: 20px 20px;
        }
        .glass-card {
            background: rgba(31, 41, 55, 0.7);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }
        .fortune-text {
            line-height: 1.8;
            word-break: keep-all;
        }
        /* Custom Animations */
        @keyframes float {
            0% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
            100% { transform: translateY(0px); }
        }
        .animate-float {
            animation: float 6s ease-in-out infinite;
        }
        .score-circle {
            transition: stroke-dashoffset 1s ease-in-out;
        }
    </style>
</head>
<body class="bg-pattern min-h-screen flex flex-col items-center pb-12">

    <!-- Header Section -->
    <header class="w-full max-w-md mt-6 px-6 text-center z-10">
        <div class="inline-block bg-indigo-900 text-indigo-200 text-xs font-bold px-3 py-1 rounded-full mb-3 border border-indigo-700">
            임자생(壬子生) | 흑쥐띠
        </div>
        <h1 class="text-3xl font-bold serif text-transparent bg-clip-text bg-gradient-to-r from-yellow-200 via-yellow-400 to-yellow-200 mb-1">
            오늘의 운세
        </h1>
        <p id="current-date" class="text-gray-400 text-sm mb-6"></p>
    </header>

    <!-- Main Fortune Card -->
    <main class="w-full max-w-md px-4 space-y-6 z-10">
        
        <!-- Total Score & Summary -->
        <div class="glass-card rounded-2xl p-6 text-center relative overflow-hidden">
            <div class="absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500"></div>
            
            <div class="flex justify-center items-center mb-4 relative">
                <!-- Circular Progress -->
                <svg class="w-32 h-32 transform -rotate-90">
                    <circle cx="64" cy="64" r="56" stroke="#374151" stroke-width="8" fill="transparent"/>
                    <circle id="score-ring" cx="64" cy="64" r="56" stroke="url(#gradient)" stroke-width="8" fill="transparent" stroke-dasharray="351.86" stroke-dashoffset="351.86" stroke-linecap="round"/>
                    <defs>
                        <linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="0%">
                            <stop offset="0%" stop-color="#818cf8" />
                            <stop offset="100%" stop-color="#c084fc" />
                        </linearGradient>
                    </defs>
                </svg>
                <div class="absolute flex flex-col items-center">
                    <span class="text-xs text-gray-400">총운</span>
                    <span id="total-score" class="text-3xl font-bold text-white">--</span>
                </div>
            </div>

            <h2 id="main-keyword" class="text-xl font-bold text-yellow-400 serif mb-3"></h2>
            <p id="main-desc" class="text-gray-300 text-sm fortune-text mb-4"></p>
            
            <div class="w-full h-px bg-gray-700 my-4"></div>
            
            <!-- User Info Badge -->
            <div class="flex items-center justify-center space-x-2 text-xs text-gray-400">
                <span>🎂 1972.01.17 (음력)</span>
                <span>•</span>
                <span>쥐띠 (만 54세)</span>
            </div>
        </div>

        <!-- Detail Grid -->
        <div class="grid grid-cols-2 gap-4">
            <!-- Wealth -->
            <div class="glass-card rounded-xl p-4 hover:bg-gray-800 transition duration-300">
                <div class="flex items-center space-x-2 mb-2">
                    <div class="p-1.5 bg-yellow-900/50 rounded-lg text-yellow-400">
                        <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>
                    </div>
                    <h3 class="font-bold text-gray-200">금전운</h3>
                </div>
                <div class="w-full bg-gray-700 rounded-full h-1.5 mb-2">
                    <div id="wealth-bar" class="bg-yellow-500 h-1.5 rounded-full" style="width: 0%"></div>
                </div>
                <p id="wealth-text" class="text-xs text-gray-400 leading-relaxed"></p>
            </div>

            <!-- Love/Interpersonal -->
            <div class="glass-card rounded-xl p-4 hover:bg-gray-800 transition duration-300">
                <div class="flex items-center space-x-2 mb-2">
                    <div class="p-1.5 bg-pink-900/50 rounded-lg text-pink-400">
                        <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"/></svg>
                    </div>
                    <h3 class="font-bold text-gray-200">애정/대인</h3>
                </div>
                <div class="w-full bg-gray-700 rounded-full h-1.5 mb-2">
                    <div id="love-bar" class="bg-pink-500 h-1.5 rounded-full" style="width: 0%"></div>
                </div>
                <p id="love-text" class="text-xs text-gray-400 leading-relaxed"></p>
            </div>

            <!-- Business/Career -->
            <div class="glass-card rounded-xl p-4 hover:bg-gray-800 transition duration-300">
                <div class="flex items-center space-x-2 mb-2">
                    <div class="p-1.5 bg-blue-900/50 rounded-lg text-blue-400">
                        <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="14" x="2" y="3" rx="2"/><line x1="8" x2="16" y1="21" y2="21"/><line x1="12" x2="12" y1="17" y2="21"/></svg>
                    </div>
                    <h3 class="font-bold text-gray-200">사업/직장</h3>
                </div>
                <div class="w-full bg-gray-700 rounded-full h-1.5 mb-2">
                    <div id="career-bar" class="bg-blue-500 h-1.5 rounded-full" style="width: 0%"></div>
                </div>
                <p id="career-text" class="text-xs text-gray-400 leading-relaxed"></p>
            </div>

            <!-- Health -->
            <div class="glass-card rounded-xl p-4 hover:bg-gray-800 transition duration-300">
                <div class="flex items-center space-x-2 mb-2">
                    <div class="p-1.5 bg-green-900/50 rounded-lg text-green-400">
                        <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4.8 2.3A.3.3 0 0 0 4.6 2C2 2.5 2 5 2 5c0 2.5 2.5 2.5 2.5 5 0 2.5-2.5 2.5-2.5 5 0 2.5 2.5 2.5 4.6 2.5.3 0 .5-.2.5-.5V2.3c0-.2-.2-.2-.3 0z"/><path d="M10 2c-2.5 0-2.5 2.5-2.5 5 0 2.5 2.5 2.5 2.5 5 0 2.5-2.5 2.5-2.5 5 0 2.5 2.5 2.5 2.5 2.5"/><path d="M14 2c-2.5 0-2.5 2.5-2.5 5 0 2.5 2.5 2.5 2.5 5 0 2.5-2.5 2.5-2.5 5 0 2.5 2.5 2.5 2.5 2.5"/></svg>
                    </div>
                    <h3 class="font-bold text-gray-200">건강운</h3>
                </div>
                <div class="w-full bg-gray-700 rounded-full h-1.5 mb-2">
                    <div id="health-bar" class="bg-green-500 h-1.5 rounded-full" style="width: 0%"></div>
                </div>
                <p id="health-text" class="text-xs text-gray-400 leading-relaxed"></p>
            </div>
        </div>

        <!-- Lucky Items -->
        <div class="glass-card rounded-2xl p-5">
            <h3 class="text-center text-sm font-bold text-gray-300 mb-4 tracking-wider">LUCKY ITEMS</h3>
            <div class="flex justify-between items-center text-center">
                <div class="flex-1 border-r border-gray-700">
                    <p class="text-xs text-gray-500 mb-1">행운의 색</p>
                    <div id="lucky-color-dot" class="w-6 h-6 rounded-full mx-auto mb-1 border border-white/20"></div>
                    <p id="lucky-color" class="font-bold text-sm"></p>
                </div>
                <div class="flex-1 border-r border-gray-700">
                    <p class="text-xs text-gray-500 mb-1">행운의 수</p>
                    <p id="lucky-num" class="text-xl font-bold serif text-yellow-400"></p>
                </div>
                <div class="flex-1">
                    <p class="text-xs text-gray-500 mb-1">귀인 방향</p>
                    <p id="lucky-dir" class="font-bold text-sm"></p>
                </div>
            </div>
        </div>

        <!-- Advice Section -->
        <div class="bg-indigo-900/30 border border-indigo-500/30 rounded-xl p-5 flex items-start space-x-3">
            <div class="mt-1">
                <svg class="text-indigo-400" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>
            </div>
            <div>
                <h4 class="font-bold text-indigo-200 text-sm mb-1">오늘의 조언</h4>
                <p id="advice-text" class="text-xs text-indigo-100/80 leading-relaxed"></p>
            </div>
        </div>

    </main>

    <footer class="mt-10 text-center text-gray-600 text-xs">
        <p>본 운세는 음력 1972년 1월 17일생 기준으로 계산되었습니다.</p>
        <p class="mt-1">Copyright © 2026 Daily Horoscope</p>
    </footer>

    <script>
        // Data for generation
        const keywords = ["대기만성", "순풍에 돛 단 듯", "신중함이 필요", "전화위복", "뜻밖의 행운", "무난한 하루", "작은 장애물", "도약의 시기"];
        const luckDescriptions = [
            "잠시 멈춰 서서 주위를 둘러보세요. 급할수록 돌아가는 지혜가 필요한 날입니다.",
            "주변 사람들의 도움으로 어려운 일이 쉽게 해결될 수 있는 날입니다.",
            "자신의 능력을 마음껏 펼칠 수 있는 기회가 찾아옵니다. 자신감을 가지세요.",
            "작은 실수로 인해 곤란해질 수 있으니 매사 꼼꼼하게 확인하는 것이 좋습니다.",
            "생각지도 못한 곳에서 재물이 들어오거나 좋은 소식을 듣게 될 것입니다.",
            "노력한 만큼의 대가를 얻게 되는 정직한 하루가 될 것입니다."
        ];
        
        const specificTexts = {
            wealth: [
                "지출 관리에 신경 써야 합니다. 충동구매를 주의하세요.",
                "뜻밖의 용돈이나 보너스가 생길 수 있습니다.",
                "투자에 신중해야 할 시기입니다. 관망하는 것이 좋습니다.",
                "작은 돈이 모여 큰 돈이 됩니다. 저축하기 좋은 날입니다.",
                "금전 흐름이 매우 원활합니다. 베풀어도 좋습니다."
            ],
            love: [
                "오해가 생길 수 있으니 말 한마디도 신중하게 하세요.",
                "가까운 사람에게 따뜻한 위로를 받게 됩니다.",
                "새로운 인연이 찾아올 수 있는 설레는 날입니다.",
                "배우자나 연인과 즐거운 시간을 보내기에 최적입니다.",
                "내 주장을 내세우기보다 상대방의 이야기를 들어주세요."
            ],
            career: [
                "업무량이 많아지지만 능력을 인정받을 기회입니다.",
                "동료와의 협력이 중요한 날입니다. 독단적인 행동은 피하세요.",
                "새로운 아이디어가 샘솟습니다. 적극적으로 제안해보세요.",
                "하던 일이 정체될 수 있으니 잠시 휴식을 취하는 것도 방법입니다.",
                "승진이나 좋은 보직 이동의 기운이 감지됩니다."
            ],
            health: [
                "가벼운 스트레칭으로 몸의 긴장을 풀어주는 것이 좋습니다.",
                "과로를 피하고 충분한 수면을 취해야 합니다.",
                "컨디션이 최상입니다. 활동적인 취미를 즐겨보세요.",
                "소화기 계통의 건강에 유의하세요. 과식은 금물입니다.",
                "마음의 평화가 신체 건강으로 이어지는 날입니다."
            ]
        };

        const colors = [
            { name: "황금색", code: "#fbbf24" },
            { name: "청색", code: "#3b82f6" },
            { name: "적색", code: "#ef4444" },
            { name: "백색", code: "#f3f4f6" },
            { name: "흑색", code: "#1f2937" },
            { name: "자색", code: "#a855f7" }
        ];
        const directions = ["동", "서", "남", "북", "동남", "서북"];

        // Seeded Random Number Generator
        // Creates consistent results for the same user on the same day
        function getDailySeed() {
            const today = new Date();
            const dateStr = today.getFullYear() + "" + (today.getMonth() + 1) + "" + today.getDate();
            const userBirth = "19720117"; // Lunar date fixed as requested
            return parseInt(dateStr) + parseInt(userBirth);
        }

        function seededRandom(seed) {
            var x = Math.sin(seed++) * 10000;
            return x - Math.floor(x);
        }

        function generateHoroscope() {
            const seed = getDailySeed();
            
            // Set Date Display
            const now = new Date();
            const days = ['일', '월', '화', '수', '목', '금', '토'];
            document.getElementById('current-date').innerText = 
                `${now.getFullYear()}년 ${now.getMonth() + 1}월 ${now.getDate()}일 (${days[now.getDay()]})`;

            // Generate Scores (0-100)
            const totalScore = Math.floor(seededRandom(seed) * 30) + 70; // 70-99 range for positive vibe
            const wealthScore = Math.floor(seededRandom(seed + 1) * 100);
            const loveScore = Math.floor(seededRandom(seed + 2) * 100);
            const careerScore = Math.floor(seededRandom(seed + 3) * 100);
            const healthScore = Math.floor(seededRandom(seed + 4) * 100);

            // Update UI - Total Score
            const circle = document.getElementById('score-ring');
            const circumference = 351.86;
            const offset = circumference - (totalScore / 100) * circumference;
            
            // Trigger animation after load
            setTimeout(() => {
                circle.style.strokeDashoffset = offset;
                animateValue("total-score", 0, totalScore, 1000);
            }, 100);

            // Select Texts
            const mainKeyword = keywords[Math.floor(seededRandom(seed + 5) * keywords.length)];
            const mainDesc = luckDescriptions[Math.floor(seededRandom(seed + 6) * luckDescriptions.length)];
            
            document.getElementById('main-keyword').innerText = mainKeyword;
            document.getElementById('main-desc').innerText = mainDesc;
            
            // Update Details
            updateBarAndText('wealth', wealthScore, seed + 7);
            updateBarAndText('love', loveScore, seed + 8);
            updateBarAndText('career', careerScore, seed + 9);
            updateBarAndText('health', healthScore, seed + 10);

            // Lucky Items
            const luckyC = colors[Math.floor(seededRandom(seed + 11) * colors.length)];
            const luckyN = Math.floor(seededRandom(seed + 12) * 9) + 1;
            const luckyD = directions[Math.floor(seededRandom(seed + 13) * directions.length)];

            document.getElementById('lucky-color').innerText = luckyC.name;
            document.getElementById('lucky-color-dot').style.backgroundColor = luckyC.code;
            document.getElementById('lucky-num').innerText = luckyN;
            document.getElementById('lucky-dir').innerText = luckyD + "쪽";

            // Advice
            const adviceList = [
                "임자년 쥐띠는 물의 기운을 타고났습니다. 흐르는 물처럼 유연하게 대처하면 막힘이 없습니다.",
                "오늘만큼은 자존심을 조금 내려놓고 주변의 조언을 경청하는 것이 이롭습니다.",
                "오전보다는 오후의 기운이 더 좋습니다. 중요한 결정은 해가 중천에 떴을 때 하세요.",
                "검은색 소품을 지니면 나쁜 기운을 막아줄 수 있습니다."
            ];
            document.getElementById('advice-text').innerText = adviceList[Math.floor(seededRandom(seed + 14) * adviceList.length)];
        }

        function updateBarAndText(type, score, seed) {
            // Text selection based on score tier
            let textIndex = 0;
            if (score > 80) textIndex = 4; // Best
            else if (score > 60) textIndex = 3;
            else if (score > 40) textIndex = 2; // Normal
            else if (score > 20) textIndex = 1;
            else textIndex = 0; // Bad

            // To add variety, randomly shift index slightly if possible within tier, 
            // but here we simplify to map directly to array length
            const texts = specificTexts[type];
            // Map 0-100 score to 0-4 index roughly
            const idx = Math.min(Math.floor((score / 100) * texts.length), texts.length - 1);

            document.getElementById(`${type}-text`).innerText = texts[idx];
            
            // Bar animation
            setTimeout(() => {
                document.getElementById(`${type}-bar`).style.width = `${score}%`;
            }, 300);
        }

        function animateValue(id, start, end, duration) {
            const obj = document.getElementById(id);
            let startTimestamp = null;
            const step = (timestamp) => {
                if (!startTimestamp) startTimestamp = timestamp;
                const progress = Math.min((timestamp - startTimestamp) / duration, 1);
                obj.innerHTML = Math.floor(progress * (end - start) + start);
                if (progress < 1) {
                    window.requestAnimationFrame(step);
                }
            };
            window.requestAnimationFrame(step);
        }

        // Initialize
        window.onload = generateHoroscope;

    </script>
</body>
</html>