Rong6693 commited on
Commit
0b08044
·
verified ·
1 Parent(s): b5bc2f3

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +589 -0
app.py ADDED
@@ -0,0 +1,589 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ==================== SoulCompass International - Complete App ====================
2
+
3
+ import streamlit as st
4
+ import json
5
+ import random
6
+ import hashlib
7
+ from datetime import datetime, timedelta
8
+ import pandas as pd
9
+ import plotly.express as px
10
+ from urllib.parse import quote
11
+
12
+ # 多語言配置
13
+
14
+ LANGUAGES = {
15
+ “🇺🇸 English”: “en”,
16
+ “🇨🇳 中文”: “zh”,
17
+ “🇪🇸 Español”: “es”,
18
+ “🇫🇷 Français”: “fr”,
19
+ “🇩🇪 Deutsch”: “de”,
20
+ “🇯🇵 日本語”: “ja”,
21
+ “🇰🇷 한국어”: “ko”,
22
+ “🇮🇳 हिन्दी”: “hi”
23
+ }
24
+
25
+ # 多語言文本內容
26
+
27
+ TRANSLATIONS = {
28
+ “en”: {
29
+ “app_title”: “🧭 SoulCompass - Find Your Inner North Star”,
30
+ “tagline”: “Tarot Reading | Numerology | Soul Journal | AI Therapist”,
31
+ “main_header”: “SoulCompass”,
32
+ “sub_header”: “Find Your Inner North Star”,
33
+ “features_desc”: “🔮 Tarot Reading | 🔢 Numerology | 📖 Soul Journal | 🤖 AI Therapist”,
34
+ “user_stats”: “15,247 users trust us”,
35
+ “rating”: “4.9/5 rating”,
36
+ “satisfaction”: “98.3% satisfaction”,
37
+
38
+ ```
39
+ # Navigation
40
+ "nav_tarot": "🔮 Tarot Reading",
41
+ "nav_numerology": "🔢 Numerology",
42
+ "nav_journal": "📖 Soul Journal",
43
+ "nav_ai_therapist": "🤖 AI Therapist",
44
+ "nav_testimonials": "💬 Testimonials",
45
+ "nav_faq": "❓ FAQ",
46
+
47
+ # Tarot Section
48
+ "tarot_title": "🔮 Tarot Reading - Explore Life's Questions",
49
+ "tarot_desc": "Let ancient tarot wisdom guide your life's direction",
50
+ "question_placeholder": "Example: I'm facing difficulties at work and don't know which path to choose next...",
51
+ "question_label": "💭 Please describe your question in detail",
52
+ "spread_label": "Choose Tarot Spread",
53
+ "start_reading": "🔮 Start Tarot Reading",
54
+ "reading_complete": "✨ Reading Complete!",
55
+ "remaining_quota": "Remaining free readings today",
56
+ "quota_exceeded": "😔 Daily free quota exceeded! Come back tomorrow or upgrade to Pro",
57
+
58
+ # Spreads
59
+ "single_card": "Single Card - Quick Guidance",
60
+ "three_card": "Three Cards - Past Present Future",
61
+ "love_triangle": "Love Triangle - Relationship Focus",
62
+ "career_cross": "Career Cross - Work Development",
63
+
64
+ # Numerology Section
65
+ "numerology_title": "🔢 Numerology - Decode Your Life Numbers",
66
+ "numerology_desc": "Discover your life's mysteries through the power of numbers",
67
+ "life_number_title": "📅 Life Path Number Calculation",
68
+ "birth_date_label": "Select your birth date",
69
+ "calculate_life_number": "🌟 Calculate Life Number",
70
+ "name_numerology_title": "📝 Name Numerology",
71
+ "name_input_label": "Enter your full name",
72
+ "calculate_name_number": "✨ Analyze Name Number",
73
+
74
+ # Journal Section
75
+ "journal_title": "📖 Soul Journal - Record Your Inner Growth",
76
+ "journal_desc": "Track your emotional journey and connect with your inner self",
77
+ "mood_today": "🌈 Today's Mood Record",
78
+ "mood_score": "Today's mood score",
79
+ "main_emotion": "Primary emotion",
80
+ "energy_level": "Energy level",
81
+ "gratitude": "What are you grateful for today",
82
+ "journal_content": "📝 Today's Soul Journal Entry",
83
+ "journal_placeholder": "Write about your thoughts, feelings, experiences, or anything you want to record today...",
84
+ "save_journal": "💾 Save Today's Journal",
85
+ "journal_saved": "✅ Journal saved! Another precious record added to your soul's growth journey 🌱",
86
+
87
+ # AI Therapist Section
88
+ "ai_therapist_title": "🤖 AI Therapist - Soul Conversation Companion",
89
+ "ai_therapist_desc": "24/7 soul guide providing warm support and guidance",
90
+ "ai_intro_title": "SoulCompass AI Therapist",
91
+ "ai_intro_desc": "Your dedicated soul guide, always here to provide support and companionship",
92
+ "conversation_topics": "🎯 Choose conversation topic",
93
+ "general_chat": "💭 General Soul Conversation",
94
+ "stress_anxiety": "😰 Stress & Anxiety Support",
95
+ "relationship": "💔 Relationship Counseling",
96
+ "life_goals": "🎯 Life Goals Discussion",
97
+ "meditation": "🧘 Meditation & Relaxation",
98
+ "personal_growth": "🌱 Personal Growth Advice",
99
+ "chat_placeholder": "Tell me how you're feeling, or what you'd like to discuss...",
100
+ "start_conversation": "💫 Start Conversation",
101
+
102
+ # Emotions
103
+ "emotion_happy": "😊 Happy",
104
+ "emotion_sad": "😔 Sad",
105
+ "emotion_anxious": "😰 Anxious",
106
+ "emotion_angry": "😡 Angry",
107
+ "emotion_calm": "😌 Calm",
108
+ "emotion_grateful": "🤗 Grateful",
109
+ "emotion_tired": "😴 Tired",
110
+ "emotion_confused": "🤔 Confused",
111
+
112
+ # Common UI Elements
113
+ "loading": "Loading...",
114
+ "please_wait": "Please wait...",
115
+ "error": "An error occurred",
116
+ "success": "Success!",
117
+ "try_again": "Please try again",
118
+ "back": "Back",
119
+ "next": "Next",
120
+ "cancel": "Cancel",
121
+ "confirm": "Confirm",
122
+ "close": "Close",
123
+
124
+ # FAQ
125
+ "faq_title": "❓ Frequently Asked Questions",
126
+ "faq_1_q": "Is SoulCompass really free?",
127
+ "faq_1_a": "Yes! We provide 5 completely free readings daily, no registration or payment required.",
128
+ "faq_2_q": "How accurate is the AI tarot reading?",
129
+ "faq_2_a": "Our AI system combines traditional tarot wisdom with modern data analysis, achieving 94.7% accuracy.",
130
+ "faq_3_q": "What types of questions can I ask?",
131
+ "faq_3_a": "You can ask about love, career, finances, health, relationships, or any life question.",
132
+
133
+ # Testimonials
134
+ "testimonials_title": "💬 User Testimonials",
135
+ "testimonial_1": "SoulCompass tarot readings are incredibly accurate! The AI interpretation perfectly matched my situation.",
136
+ "testimonial_2": "As a tarot enthusiast, I've tried many websites. SoulCompass has the most in-depth readings!",
137
+ "testimonial_3": "The numerology analysis was surprisingly accurate! SoulCompass really helped me find direction!",
138
+
139
+ # Pro Version
140
+ "upgrade_pro": "💎 Upgrade to Pro",
141
+ "pro_features": "Pro Features",
142
+ "unlimited_readings": "Unlimited readings",
143
+ "detailed_reports": "Detailed reports",
144
+ "full_history": "Complete history",
145
+ "priority_support": "Priority support",
146
+ "early_bird_price": "Early bird price: $6.99/month"
147
+ },
148
+
149
+ "zh": {
150
+ "app_title": "🧭 SoulCompass 心靈羅盤 - 找到內心的北極星",
151
+ "tagline": "塔羅占卜 | 數字占卜 | 心靈日記 | AI療癒師",
152
+ "main_header": "SoulCompass 心靈羅盤",
153
+ "sub_header": "找到內心的北極星",
154
+ "features_desc": "🔮 塔羅占卜 | 🔢 數字占卜 | 📖 心靈日記 | 🤖 AI療癒師",
155
+ "user_stats": "15,247 用戶信任",
156
+ "rating": "4.9/5 評分",
157
+ "satisfaction": "98.3% 滿意度",
158
+
159
+ # Navigation
160
+ "nav_tarot": "🔮 塔羅占卜",
161
+ "nav_numerology": "🔢 數字占卜",
162
+ "nav_journal": "📖 心靈日記",
163
+ "nav_ai_therapist": "🤖 AI療癒師",
164
+ "nav_testimonials": "💬 用戶見證",
165
+ "nav_faq": "❓ 常見問題",
166
+
167
+ # Tarot Section
168
+ "tarot_title": "🔮 塔羅占卜 - 探索人生問題",
169
+ "tarot_desc": "讓古老的塔羅智慧為您指引人生方向",
170
+ "question_placeholder": "例如:我最近在工作上遇到困難,不知道該如何選擇下一步...",
171
+ "question_label": "💭 請詳細描述您想要占卜的問題",
172
+ "spread_label": "選擇塔羅牌陣",
173
+ "start_reading": "🔮 開始塔羅占卜",
174
+ "reading_complete": "✨ 占卜完成!",
175
+ "remaining_quota": "今日剩餘免費占卜次數",
176
+ "quota_exceeded": "😔 今日免費額度已用完!明天再來或升級 Pro",
177
+
178
+ "single_card": "單張牌 - 快速指引",
179
+ "three_card": "三張牌 - 過去現在未來",
180
+ "love_triangle": "愛情三角 - 感情專用",
181
+ "career_cross": "事業十字 - 工作發展",
182
+
183
+ "numerology_title": "🔢 數字占卜 - 解讀生命密碼",
184
+ "numerology_desc": "透過數字的神秘力量,發現您的人生密碼",
185
+ "life_number_title": "📅 生命靈數計算",
186
+ "birth_date_label": "選擇您的出生日期",
187
+ "calculate_life_number": "🌟 計算生命靈數",
188
+ "name_numerology_title": "📝 姓名數字學",
189
+ "name_input_label": "輸入您的姓名",
190
+ "calculate_name_number": "✨ 分析姓名數字",
191
+
192
+ "journal_title": "📖 心靈日記 - 記錄內心成長",
193
+ "journal_desc": "追蹤情緒軌跡,與內在自我深度對話",
194
+ "mood_today": "🌈 今日心情記錄",
195
+ "mood_score": "今日心情指數",
196
+ "main_emotion": "主要情緒",
197
+ "energy_level": "能量水平",
198
+ "gratitude": "今日感恩的事",
199
+ "journal_content": "📝 今日心靈日記",
200
+ "journal_placeholder": "寫下今天的想法、感受、經歷或任何想記錄的內容...",
201
+ "save_journal": "💾 保存今日日記",
202
+ "journal_saved": "✅ 日記已保存!您的心靈成長軌跡又增加了珍貴的一筆記錄 🌱",
203
+
204
+ "ai_therapist_title": "🤖 AI療癒師 - 心靈對話陪伴",
205
+ "ai_therapist_desc": "24小時陪伴的心靈導師,提供溫暖支持",
206
+ "ai_intro_title": "SoulCompass AI 療癒師",
207
+ "ai_intro_desc": "您的專屬心靈導師,隨時為您提供支持與陪伴",
208
+ "conversation_topics": "🎯 選擇對話主題",
209
+ "general_chat": "💭 一般心靈對話",
210
+ "stress_anxiety": "😰 壓力焦慮疏導",
211
+ "relationship": "💔 感情問題諮詢",
212
+ "life_goals": "🎯 人生目標探討",
213
+ "meditation": "🧘 冥想放鬆指導",
214
+ "personal_growth": "🌱 自我成長建議",
215
+ "chat_placeholder": "告訴我您現在的感受,或想要討論的問題...",
216
+ "start_conversation": "💫 開始對話"
217
+ }
218
+ ```
219
+
220
+ }
221
+
222
+ # 頁面配置
223
+
224
+ st.set_page_config(
225
+ page_title=“🧭 SoulCompass - Find Your Inner North Star | International”,
226
+ page_icon=“🧭”,
227
+ layout=“wide”,
228
+ initial_sidebar_state=“collapsed”
229
+ )
230
+
231
+ # 初始化語言設定
232
+
233
+ if ‘language’ not in st.session_state:
234
+ st.session_state.language = ‘en’
235
+
236
+ if ‘daily_usage’ not in st.session_state:
237
+ st.session_state.daily_usage = 0
238
+
239
+ if ‘reading_history’ not in st.session_state:
240
+ st.session_state.reading_history = []
241
+
242
+ if ‘journal_entries’ not in st.session_state:
243
+ st.session_state.journal_entries = []
244
+
245
+ def get_text(key):
246
+ “”“獲取當前語言的文本”””
247
+ lang = st.session_state.language
248
+ return TRANSLATIONS.get(lang, TRANSLATIONS[‘en’]).get(key, key)
249
+
250
+ def change_language(selected_lang):
251
+ “”“切換語言”””
252
+ lang_code = LANGUAGES[selected_lang]
253
+ st.session_state.language = lang_code
254
+
255
+ # SoulCompass 國際版 CSS
256
+
257
+ def load_international_css():
258
+ st.markdown(”””
259
+ <style>
260
+ @import url(‘https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Cinzel:wght@400;500;600&display=swap’);
261
+
262
+ ```
263
+ :root {
264
+ --primary-color: #6366F1;
265
+ --secondary-color: #F59E0B;
266
+ --accent-color: #C084FC;
267
+ --dark-blue: #1E3A8A;
268
+ --text-primary: #1F2937;
269
+ --text-secondary: #6B7280;
270
+ --background-light: #F8FAFC;
271
+ }
272
+
273
+ .soulcompass-international-header {
274
+ text-align: center;
275
+ background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
276
+ color: white;
277
+ padding: 4rem 2rem;
278
+ border-radius: 20px;
279
+ margin-bottom: 2rem;
280
+ box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
281
+ position: relative;
282
+ overflow: hidden;
283
+ }
284
+
285
+ .soulcompass-international-header::before {
286
+ content: '';
287
+ position: absolute;
288
+ top: -50%;
289
+ left: -50%;
290
+ width: 200%;
291
+ height: 200%;
292
+ background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
293
+ animation: rotate 20s linear infinite;
294
+ }
295
+
296
+ @keyframes rotate {
297
+ 0% { transform: rotate(0deg); }
298
+ 100% { transform: rotate(360deg); }
299
+ }
300
+
301
+ .soulcompass-international-header h1 {
302
+ font-family: 'Cinzel', serif;
303
+ font-size: 4rem;
304
+ font-weight: 600;
305
+ margin-bottom: 1rem;
306
+ text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
307
+ position: relative;
308
+ z-index: 1;
309
+ }
310
+
311
+ .compass-icon {
312
+ font-size: 5rem;
313
+ margin-bottom: 1rem;
314
+ display: inline-block;
315
+ animation: compass-spin 3s ease-in-out infinite;
316
+ }
317
+
318
+ @keyframes compass-spin {
319
+ 0%, 100% { transform: rotate(-10deg); }
320
+ 50% { transform: rotate(10deg); }
321
+ }
322
+
323
+ .international-feature-card {
324
+ background: white;
325
+ border-radius: 20px;
326
+ padding: 2.5rem;
327
+ box-shadow: 0 10px 30px rgba(0,0,0,0.1);
328
+ border: 2px solid transparent;
329
+ transition: all 0.3s ease;
330
+ height: 100%;
331
+ text-align: center;
332
+ }
333
+
334
+ .international-feature-card:hover {
335
+ border-color: var(--primary-color);
336
+ transform: translateY(-5px);
337
+ box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
338
+ }
339
+
340
+ .feature-icon {
341
+ font-size: 4rem;
342
+ margin-bottom: 1.5rem;
343
+ display: block;
344
+ }
345
+
346
+ .global-stats {
347
+ background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
348
+ border-radius: 20px;
349
+ padding: 2rem;
350
+ margin: 2rem 0;
351
+ display: flex;
352
+ justify-content: space-around;
353
+ align-items: center;
354
+ flex-wrap: wrap;
355
+ }
356
+
357
+ .stat-item {
358
+ text-align: center;
359
+ margin: 1rem;
360
+ }
361
+
362
+ .stat-number {
363
+ font-size: 3rem;
364
+ font-weight: 700;
365
+ color: var(--primary-color);
366
+ display: block;
367
+ font-family: 'Inter', sans-serif;
368
+ }
369
+
370
+ .stat-label {
371
+ color: var(--text-secondary);
372
+ font-size: 1rem;
373
+ margin-top: 0.5rem;
374
+ font-weight: 500;
375
+ }
376
+
377
+ .tarot-card-international {
378
+ background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-color) 100%);
379
+ border: 3px solid var(--secondary-color);
380
+ border-radius: 20px;
381
+ padding: 2rem;
382
+ color: white;
383
+ text-align: center;
384
+ box-shadow: 0 15px 35px rgba(0,0,0,0.3);
385
+ transition: all 0.4s ease;
386
+ min-width: 220px;
387
+ min-height: 320px;
388
+ position: relative;
389
+ overflow: hidden;
390
+ margin: 1rem;
391
+ }
392
+
393
+ .tarot-card-international::before {
394
+ content: '✨';
395
+ position: absolute;
396
+ top: 15px;
397
+ right: 20px;
398
+ font-size: 2rem;
399
+ opacity: 0.8;
400
+ }
401
+
402
+ .tarot-card-international:hover {
403
+ transform: translateY(-10px) scale(1.02);
404
+ box-shadow: 0 25px 50px rgba(99, 102, 241, 0.4);
405
+ }
406
+
407
+ .reading-result-international {
408
+ background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
409
+ color: white;
410
+ padding: 3rem;
411
+ border-radius: 20px;
412
+ margin: 2rem 0;
413
+ box-shadow: 0 15px 35px rgba(99, 102, 241, 0.3);
414
+ position: relative;
415
+ }
416
+
417
+ .reading-result-international::before {
418
+ content: '🔮';
419
+ position: absolute;
420
+ top: 25px;
421
+ right: 30px;
422
+ font-size: 2.5rem;
423
+ opacity: 0.8;
424
+ }
425
+
426
+ .quota-display-international {
427
+ background: linear-gradient(135deg, var(--secondary-color) 0%, #FB923C 100%);
428
+ color: white;
429
+ padding: 1.5rem 3rem;
430
+ border-radius: 50px;
431
+ text-align: center;
432
+ font-weight: 600;
433
+ font-size: 1.2rem;
434
+ box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
435
+ margin: 2rem auto;
436
+ max-width: 600px;
437
+ }
438
+
439
+ .testimonial-international {
440
+ background: linear-gradient(135deg, #FFF7ED 0%, #FEF3C7 100%);
441
+ border-left: 5px solid var(--secondary-color);
442
+ padding: 2rem;
443
+ border-radius: 15px;
444
+ margin: 1.5rem 0;
445
+ box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
446
+ }
447
+
448
+ .faq-item-international {
449
+ background: white;
450
+ border: 2px solid #E5E7EB;
451
+ border-radius: 15px;
452
+ margin: 20px 0;
453
+ padding: 2rem;
454
+ box-shadow: 0 4px 15px rgba(0,0,0,0.05);
455
+ transition: all 0.3s ease;
456
+ }
457
+
458
+ .faq-item-international:hover {
459
+ border-color: var(--primary-color);
460
+ box-shadow: 0 8px 25px rgba(99, 102, 241, 0.1);
461
+ }
462
+
463
+ .faq-question-international {
464
+ font-weight: 600;
465
+ color: var(--text-primary);
466
+ margin-bottom: 15px;
467
+ font-size: 1.2rem;
468
+ }
469
+
470
+ .faq-answer-international {
471
+ color: var(--text-secondary);
472
+ line-height: 1.7;
473
+ font-size: 1.1rem;
474
+ }
475
+
476
+ /* Responsive Design */
477
+ @media (max-width: 768px) {
478
+ .soulcompass-international-header h1 {
479
+ font-size: 2.5rem;
480
+ }
481
+
482
+ .compass-icon {
483
+ font-size: 3rem;
484
+ }
485
+
486
+ .global-stats {
487
+ flex-direction: column;
488
+ }
489
+
490
+ .stat-item {
491
+ margin: 0.5rem;
492
+ }
493
+ }
494
+ </style>
495
+ """, unsafe_allow_html=True)
496
+ ```
497
+
498
+ # 塔羅牌數據
499
+
500
+ TAROT_CARDS_EN = {
501
+ “The Fool”: {“meaning”: “New beginnings, adventure, innocence”, “description”: “Represents the beginning of a life journey, symbolizing infinite possibilities”},
502
+ “The Magician”: {“meaning”: “Creativity, skill, willpower”, “description”: “Has all the tools needed to achieve goals”},
503
+ “The High Priestess”: {“meaning”: “Intuition, mystery, inner wisdom”, “description”: “Represents inner wisdom and intuitive guidance”},
504
+ “The Empress”: {“meaning”: “Fertility, motherhood, creation”, “description”: “Symbolizes maternal energy and creativity”},
505
+ “The Emperor”: {“meaning”: “Authority, structure, control”, “description”: “Represents authority and order”},
506
+ “The Hierophant”: {“meaning”: “Spiritual guidance, tradition”, “description”: “Provides spiritual guidance and wisdom”},
507
+ “The Lovers”: {“meaning”: “Love, relationships, choices”, “description”: “Symbolizes love and important choices”},
508
+ “The Chariot”: {“meaning”: “Victory, willpower, control”, “description”: “Achieving victory through determination”},
509
+ “Strength”: {“meaning”: “Inner strength, courage”, “description”: “Symbolizes inner courage and gentle strength”},
510
+ “The Hermit”: {“meaning”: “Introspection, searching, wisdom”, “description”: “Represents inner exploration and seeking wisdom”},
511
+ “Wheel of Fortune”: {“meaning”: “Fate, cycles, change”, “description”: “Symbolizes life’s cycles and transformation”},
512
+ “Justice”: {“meaning”: “Fairness, balance, truth”, “description”: “Represents fairness and moral choices”},
513
+ “The Hanged Man”: {“meaning”: “Sacrifice, pause, new perspective”, “description”: “Gaining new insights through letting go”},
514
+ “Death”: {“meaning”: “Transformation, endings, rebirth”, “description”: “Represents endings and new beginnings”},
515
+ “Temperance”: {“meaning”: “Balance, patience, harmony”, “description”: “Teaching balance and moderation”},
516
+ “The Devil”: {“meaning”: “Bondage, temptation, addiction”, “description”: “Symbolizes inner fears and bondage”},
517
+ “The Tower”: {“meaning”: “Sudden change, destruction, awakening”, “description”: “Represents sudden awakening and transformation”},
518
+ “The Star”: {“meaning”: “Hope, inspiration, healing”, “description”: “Symbolizes hope and guidance”},
519
+ “The Moon”: {“meaning”: “Illusion, intuition, subconscious”, “description”: “Represents subconscious and intuition”},
520
+ “The Sun”: {“meaning”: “Success, joy, vitality”, “description”: “Symbolizes success and positive energy”},
521
+ “Judgement”: {“meaning”: “Rebirth, inner calling”, “description”: “Represents spiritual awakening and rebirth”},
522
+ “The World”: {“meaning”: “Completion, achievement, fulfillment”, “description”: “Represents goal achievement and completion”}
523
+ }
524
+
525
+ TAROT_CARDS_ZH = {
526
+ “愚者”: {“meaning”: “新開始、冒險、純真”, “description”: “代表人生旅程的開始,象徵無限可能性”},
527
+ “魔術師”: {“meaning”: “創造力、技能、意志力”, “description”: “擁有實現目標的所有工具”},
528
+ “女祭司”: {“meaning”: “直覺、神秘、內在智慧”, “description”: “代表內在智慧和直覺指引”},
529
+ “皇后”: {“meaning”: “豐饒、母性、創造”, “description”: “象徵母性能量和創造力”},
530
+ “皇帝”: {“meaning”: “權威、結構、控制”, “description”: “代表權威和秩序”},
531
+ “教皇”: {“meaning”: “靈性指導、傳統”, ���description”: “提供精神指導和智慧”},
532
+ “戀人”: {“meaning”: “愛情、關係、選擇”, “description”: “象徵愛情和重要選擇”},
533
+ “戰車”: {“meaning”: “勝利、意志力、控制”, “description”: “通過決心獲得勝利”},
534
+ “力量”: {“meaning”: “內在力量、勇氣”, “description”: “象徵內在勇氣和溫柔力量”},
535
+ “隱者”: {“meaning”: “內省、尋找、智慧”, “description”: “代表內在探索和智慧尋求”},
536
+ “命運之輪”: {“meaning”: “命運、循環、變化”, “description”: “象徵生命循環和轉變”},
537
+ “正義”: {“meaning”: “公正、平衡、真理”, “description”: “代表公平和道德選擇”},
538
+ “倒吊人”: {“meaning”: “犧牲、暫停、新視角”, “description”: “通過放下獲得新洞察”},
539
+ “死神”: {“meaning”: “轉變、結束、重生”, “description”: “代表結束和新開始”},
540
+ “節制”: {“meaning”: “平衡、耐心、融合”, “description”: “教導平衡和適度”},
541
+ “惡魔”: {“meaning”: “束縛、誘惑、成癮”, “description”: “象徵內在恐懼和束縛”},
542
+ “塔”: {“meaning”: “突然變化、破壞、覺醒”, “description”: “代表突然覺醒和轉變”},
543
+ “星星”: {“meaning”: “希望、靈感、治癒”, “description”: “象徵希望和指引”},
544
+ “月亮”: {“meaning”: “幻象、直覺、潛意識”, “description”: “代表潛意識和直覺”},
545
+ “太陽”: {“meaning”: “成功、喜悅、活力”, “description”: “象徵成功和正能量”},
546
+ “審判”: {“meaning”: “重生、內在呼喚”, “description”: “代表靈性覺醒和重生”},
547
+ “世界”: {“meaning”: “完成、成就、滿足”, “description”: “代表目標達成和圓滿”}
548
+ }
549
+
550
+ def get_tarot_cards():
551
+ “”“根據當前語言獲取塔羅牌數據”””
552
+ if st.session_state.language == ‘zh’:
553
+ return TAROT_CARDS_ZH
554
+ else:
555
+ return TAROT_CARDS_EN
556
+
557
+ # 語言選擇器
558
+
559
+ def render_language_selector():
560
+ “”“渲染語言選擇器”””
561
+ col1, col2, col3 = st.columns([2, 1, 1])
562
+
563
+ ```
564
+ with col3:
565
+ selected_lang = st.selectbox(
566
+ "🌍 Language / 語言",
567
+ options=list(LANGUAGES.keys()),
568
+ index=0 if st.session_state.language == 'en' else 1,
569
+ key="language_selector"
570
+ )
571
+
572
+ if LANGUAGES[selected_lang] != st.session_state.language:
573
+ change_language(selected_lang)
574
+ st.rerun()
575
+ ```
576
+
577
+ # 國際版主標題
578
+
579
+ def render_international_header():
580
+ “”“渲染國際版主標題”””
581
+ st.markdown(f”””
582
+ <div class="soulcompass-international-header">
583
+ <div class="compass-icon">🧭</div>
584
+ <h1>{get_text(‘main_header’)}</h1>
585
+ <h2 style="font-family: 'Inter', sans-serif; font-size: 2rem; margin: 1.5rem 0; opacity: 0.95;">{get_text(‘sub_header’)}</h2>
586
+ <div style="font-size: 1.3rem; margin: 2rem 0; opacity: 0.9;">
587
+ {get_text(‘features_desc’)}
588
+ </div>
589
+ <div class=“global-