Rong6693 commited on
Commit
bef6f3d
ยท
verified ยท
1 Parent(s): 120f048

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +579 -484
app.py CHANGED
@@ -1,315 +1,221 @@
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;
@@ -320,270 +226,459 @@ st.markdown(โ€โ€โ€
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-
 
 
 
 
1
  import streamlit as st
 
2
  import random
3
+ from datetime import datetime
4
+
5
+ # ้ ้ข้…็ฝฎ
6
+
7
+ st.set_page_config(
8
+ page_title=โ€œSoulCompass - Find Your Inner North Starโ€,
9
+ page_icon=โ€œ๐Ÿงญโ€,
10
+ layout=โ€œwideโ€
11
+ )
12
 
13
+ # ่ชž่จ€้…็ฝฎ
14
 
15
  LANGUAGES = {
16
+ โ€œEnglishโ€: โ€œenโ€,
17
+ โ€œไธญๆ–‡โ€: โ€œzhโ€,
18
+ โ€œEspaรฑolโ€: โ€œesโ€,
19
+ โ€œFranรงaisโ€: โ€œfrโ€
 
 
 
 
20
  }
21
 
22
+ # ๅคš่ชž่จ€ๆ–‡ๆœฌ
23
 
24
+ TEXTS = {
25
  โ€œenโ€: {
26
+ โ€œtitleโ€: โ€œSoulCompassโ€,
27
+ โ€œsubtitleโ€: โ€œFind Your Inner North Starโ€,
28
+ โ€œfeaturesโ€: โ€œTarot Reading | Numerology | Soul Journal | AI Therapistโ€,
29
+ โ€œtarot_tabโ€: โ€œTarot Readingโ€,
30
+ โ€œnumerology_tabโ€: โ€œNumerologyโ€,
31
+ โ€œjournal_tabโ€: โ€œSoul Journalโ€,
32
+ โ€œai_tabโ€: โ€œAI Therapistโ€,
33
+ โ€œquestion_labelโ€: โ€œPlease describe your question in detailโ€,
34
+ โ€œquestion_placeholderโ€: โ€œExample: Iโ€™m facing difficulties at work and donโ€™t know which path to choose nextโ€ฆโ€,
35
+ โ€œstart_readingโ€: โ€œStart Tarot Readingโ€,
36
+ โ€œquota_textโ€: โ€œDaily Free Readingsโ€,
37
+ โ€œquota_exceededโ€: โ€œDaily free quota exceeded! Come back tomorrowโ€,
38
+ โ€œreading_completeโ€: โ€œYour tarot reading is complete!โ€,
39
+ โ€œmood_scoreโ€: โ€œTodayโ€™s mood scoreโ€,
40
+ โ€œenergy_levelโ€: โ€œEnergy levelโ€,
41
+ โ€œsave_journalโ€: โ€œSave Todayโ€™s Journalโ€,
42
+ โ€œjournal_savedโ€: โ€œJournal saved! Another precious record added to your growth journeyโ€
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  },
44
+ โ€œzhโ€: {
45
+ โ€œtitleโ€: โ€œSoulCompass ๅฟƒ้ˆ็พ…็›คโ€,
46
+ โ€œsubtitleโ€: โ€œๆ‰พๅˆฐๅ…งๅฟƒ็š„ๅŒ—ๆฅตๆ˜Ÿโ€,
47
+ โ€œfeaturesโ€: โ€œๅก”็พ…ๅ ๅœ | ๆ•ธๅญ—ๅ ๅœ | ๅฟƒ้ˆๆ—ฅ่จ˜ | AI็™‚็™’ๅธซโ€,
48
+ โ€œtarot_tabโ€: โ€œๅก”็พ…ๅ ๅœโ€,
49
+ โ€œnumerology_tabโ€: โ€œๆ•ธๅญ—ๅ ๅœโ€,
50
+ โ€œjournal_tabโ€: โ€œๅฟƒ้ˆๆ—ฅ่จ˜โ€,
51
+ โ€œai_tabโ€: โ€œAI็™‚็™’ๅธซโ€,
52
+ โ€œquestion_labelโ€: โ€œ่ซ‹่ฉณ็ดฐๆ่ฟฐๆ‚จๆƒณ่ฆๅ ๅœ็š„ๅ•้กŒโ€,
53
+ โ€œquestion_placeholderโ€: โ€œไพ‹ๅฆ‚๏ผšๆˆ‘ๆœ€่ฟ‘ๅœจๅทฅไฝœไธŠ้‡ๅˆฐๅ›ฐ้›ฃ๏ผŒไธ็Ÿฅ้“่ฉฒๅฆ‚ไฝ•้ธๆ“‡ไธ‹ไธ€ๆญฅโ€ฆโ€,
54
+ โ€œstart_readingโ€: โ€œ้–‹ๅง‹ๅก”็พ…ๅ ๅœโ€,
55
+ โ€œquota_textโ€: โ€œๆฏๆ—ฅๅ…่ฒปๅ ๅœๆฌกๆ•ธโ€,
56
+ โ€œquota_exceededโ€: โ€œไปŠๆ—ฅๅ…่ฒป้กๅบฆๅทฒ็”จๅฎŒ๏ผๆ˜Žๅคฉๅ†ไพ†โ€,
57
+ โ€œreading_completeโ€: โ€œๆ‚จ็š„ๅก”็พ…ๅ ๅœๅทฒๅฎŒๆˆ๏ผโ€,
58
+ โ€œmood_scoreโ€: โ€œไปŠๆ—ฅๅฟƒๆƒ…ๆŒ‡ๆ•ธโ€,
59
+ โ€œenergy_levelโ€: โ€œ่ƒฝ้‡ๆฐดๅนณโ€,
60
+ โ€œsave_journalโ€: โ€œไฟๅญ˜ไปŠๆ—ฅๆ—ฅ่จ˜โ€,
61
+ โ€œjournal_savedโ€: โ€œๆ—ฅ่จ˜ๅทฒไฟๅญ˜๏ผๆ‚จ็š„ๆˆ้•ท่ปŒ่ทกๅˆๅขžๅŠ ไบ†็่ฒด็š„่จ˜้Œ„โ€
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  }
 
 
63
  }
64
 
65
+ # ๅก”็พ…็‰Œๆ•ธๆ“š
 
 
 
 
 
 
 
66
 
67
+ TAROT_CARDS = {
68
+ โ€œThe Foolโ€: {
69
+ โ€œmeaningโ€: โ€œNew beginnings, adventure, innocenceโ€,
70
+ โ€œdescriptionโ€: โ€œRepresents the beginning of a life journey, symbolizing infinite possibilitiesโ€
71
+ },
72
+ โ€œThe Magicianโ€: {
73
+ โ€œmeaningโ€: โ€œCreativity, skill, willpowerโ€,
74
+ โ€œdescriptionโ€: โ€œHas all the tools needed to achieve goalsโ€
75
+ },
76
+ โ€œThe High Priestessโ€: {
77
+ โ€œmeaningโ€: โ€œIntuition, mystery, inner wisdomโ€,
78
+ โ€œdescriptionโ€: โ€œRepresents inner wisdom and intuitive guidanceโ€
79
+ },
80
+ โ€œThe Empressโ€: {
81
+ โ€œmeaningโ€: โ€œFertility, motherhood, creationโ€,
82
+ โ€œdescriptionโ€: โ€œSymbolizes maternal energy and creativityโ€
83
+ },
84
+ โ€œThe Emperorโ€: {
85
+ โ€œmeaningโ€: โ€œAuthority, structure, controlโ€,
86
+ โ€œdescriptionโ€: โ€œRepresents authority and orderโ€
87
+ },
88
+ โ€œThe Hierophantโ€: {
89
+ โ€œmeaningโ€: โ€œSpiritual guidance, traditionโ€,
90
+ โ€œdescriptionโ€: โ€œProvides spiritual guidance and wisdomโ€
91
+ },
92
+ โ€œThe Loversโ€: {
93
+ โ€œmeaningโ€: โ€œLove, relationships, choicesโ€,
94
+ โ€œdescriptionโ€: โ€œSymbolizes love and important choicesโ€
95
+ },
96
+ โ€œThe Chariotโ€: {
97
+ โ€œmeaningโ€: โ€œVictory, willpower, controlโ€,
98
+ โ€œdescriptionโ€: โ€œAchieving victory through determinationโ€
99
+ },
100
+ โ€œStrengthโ€: {
101
+ โ€œmeaningโ€: โ€œInner strength, courageโ€,
102
+ โ€œdescriptionโ€: โ€œSymbolizes inner courage and gentle strengthโ€
103
+ },
104
+ โ€œThe Hermitโ€: {
105
+ โ€œmeaningโ€: โ€œIntrospection, searching, wisdomโ€,
106
+ โ€œdescriptionโ€: โ€œRepresents inner exploration and seeking wisdomโ€
107
+ },
108
+ โ€œWheel of Fortuneโ€: {
109
+ โ€œmeaningโ€: โ€œFate, cycles, changeโ€,
110
+ โ€œdescriptionโ€: โ€œSymbolizes life cycles and transformationโ€
111
+ },
112
+ โ€œJusticeโ€: {
113
+ โ€œmeaningโ€: โ€œFairness, balance, truthโ€,
114
+ โ€œdescriptionโ€: โ€œRepresents fairness and moral choicesโ€
115
+ },
116
+ โ€œThe Hanged Manโ€: {
117
+ โ€œmeaningโ€: โ€œSacrifice, pause, new perspectiveโ€,
118
+ โ€œdescriptionโ€: โ€œGaining new insights through letting goโ€
119
+ },
120
+ โ€œDeathโ€: {
121
+ โ€œmeaningโ€: โ€œTransformation, endings, rebirthโ€,
122
+ โ€œdescriptionโ€: โ€œRepresents endings and new beginningsโ€
123
+ },
124
+ โ€œTemperanceโ€: {
125
+ โ€œmeaningโ€: โ€œBalance, patience, harmonyโ€,
126
+ โ€œdescriptionโ€: โ€œTeaching balance and moderationโ€
127
+ },
128
+ โ€œThe Devilโ€: {
129
+ โ€œmeaningโ€: โ€œBondage, temptation, addictionโ€,
130
+ โ€œdescriptionโ€: โ€œSymbolizes inner fears and bondageโ€
131
+ },
132
+ โ€œThe Towerโ€: {
133
+ โ€œmeaningโ€: โ€œSudden change, destruction, awakeningโ€,
134
+ โ€œdescriptionโ€: โ€œRepresents sudden awakening and transformationโ€
135
+ },
136
+ โ€œThe Starโ€: {
137
+ โ€œmeaningโ€: โ€œHope, inspiration, healingโ€,
138
+ โ€œdescriptionโ€: โ€œSymbolizes hope and guidanceโ€
139
+ },
140
+ โ€œThe Moonโ€: {
141
+ โ€œmeaningโ€: โ€œIllusion, intuition, subconsciousโ€,
142
+ โ€œdescriptionโ€: โ€œRepresents subconscious and intuitionโ€
143
+ },
144
+ โ€œThe Sunโ€: {
145
+ โ€œmeaningโ€: โ€œSuccess, joy, vitalityโ€,
146
+ โ€œdescriptionโ€: โ€œSymbolizes success and positive energyโ€
147
+ },
148
+ โ€œJudgementโ€: {
149
+ โ€œmeaningโ€: โ€œRebirth, inner callingโ€,
150
+ โ€œdescriptionโ€: โ€œRepresents spiritual awakening and rebirthโ€
151
+ },
152
+ โ€œThe Worldโ€: {
153
+ โ€œmeaningโ€: โ€œCompletion, achievement, fulfillmentโ€,
154
+ โ€œdescriptionโ€: โ€œRepresents goal achievement and completionโ€
155
+ }
156
+ }
157
 
158
+ # ๅˆๅง‹ๅŒ–ๆœƒ่ฉฑ็‹€ๆ…‹
 
159
 
160
  if โ€˜daily_usageโ€™ not in st.session_state:
161
  st.session_state.daily_usage = 0
162
 
163
+ if โ€˜languageโ€™ not in st.session_state:
164
+ st.session_state.language = โ€˜enโ€™
165
 
166
  if โ€˜journal_entriesโ€™ not in st.session_state:
167
  st.session_state.journal_entries = []
168
 
169
  def get_text(key):
170
  โ€œโ€โ€œ็ฒๅ–็•ถๅ‰่ชž่จ€็š„ๆ–‡ๆœฌโ€โ€โ€
171
+ return TEXTS[st.session_state.language].get(key, key)
 
 
 
 
 
 
172
 
173
+ def change_language():
174
+ โ€œโ€โ€œ่ชž่จ€ๅˆ‡ๆ›โ€โ€โ€
175
+ lang_names = list(LANGUAGES.keys())
176
+ lang_codes = list(LANGUAGES.values())
177
 
178
+ ```
179
+ current_index = 0
180
+ if st.session_state.language in lang_codes:
181
+ current_index = lang_codes.index(st.session_state.language)
182
+
183
+ selected_lang_name = st.selectbox(
184
+ "Language / ่ชž่จ€",
185
+ lang_names,
186
+ index=current_index
187
+ )
188
 
189
+ new_lang_code = LANGUAGES[selected_lang_name]
190
+ if new_lang_code != st.session_state.language:
191
+ st.session_state.language = new_lang_code
192
+ st.rerun()
193
  ```
 
 
 
 
 
 
 
 
 
194
 
195
+ # CSSๆจฃๅผ
196
+
197
+ st.markdown(โ€โ€โ€
198
+
199
+ <style>
200
+ .main-header {
201
  text-align: center;
202
+ background: linear-gradient(135deg, #6366F1 0%, #C084FC 100%);
203
  color: white;
204
+ padding: 3rem 2rem;
205
  border-radius: 20px;
206
  margin-bottom: 2rem;
207
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
 
 
 
 
 
 
 
 
 
 
 
 
 
208
  }
209
 
210
+ .main-header h1 {
211
+ font-size: 3.5rem;
 
 
 
 
 
 
212
  font-weight: 600;
213
  margin-bottom: 1rem;
214
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
 
 
215
  }
216
 
217
  .compass-icon {
218
+ font-size: 4rem;
219
  margin-bottom: 1rem;
220
  display: inline-block;
221
  animation: compass-spin 3s ease-in-out infinite;
 
226
  50% { transform: rotate(10deg); }
227
  }
228
 
229
+ .tarot-card {
230
+ background: linear-gradient(135deg, #1E3A8A 0%, #6366F1 100%);
231
+ border: 3px solid #F59E0B;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
  border-radius: 20px;
233
  padding: 2rem;
234
  color: white;
235
  text-align: center;
236
+ margin: 1rem;
237
  box-shadow: 0 15px 35px rgba(0,0,0,0.3);
238
  transition: all 0.4s ease;
 
 
 
 
 
239
  }
240
 
241
+ .tarot-card:hover {
242
+ transform: translateY(-5px) scale(1.02);
 
 
 
 
 
243
  }
244
 
245
+ .reading-result {
246
+ background: linear-gradient(135deg, #6366F1 0%, #C084FC 100%);
 
 
 
 
 
247
  color: white;
248
+ padding: 2.5rem;
249
  border-radius: 20px;
250
  margin: 2rem 0;
251
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.3);
 
252
  }
253
 
254
+ .quota-display {
255
+ background: linear-gradient(135deg, #F59E0B 0%, #FB923C 100%);
 
 
 
 
 
 
 
 
 
256
  color: white;
257
+ padding: 1rem 2rem;
258
  border-radius: 50px;
259
  text-align: center;
260
  font-weight: 600;
 
 
261
  margin: 2rem auto;
262
+ max-width: 400px;
263
  }
264
 
265
+ .feature-card {
 
 
 
 
 
 
 
 
 
266
  background: white;
 
267
  border-radius: 15px;
 
268
  padding: 2rem;
269
+ box-shadow: 0 4px 15px rgba(0,0,0,0.1);
270
+ border: 2px solid transparent;
271
  transition: all 0.3s ease;
272
+ height: 100%;
273
  }
274
 
275
+ .feature-card:hover {
276
+ border-color: #6366F1;
277
+ transform: translateY(-2px);
278
  }
279
 
280
+ .journal-entry {
281
+ background: #F8FAFC;
282
+ border-radius: 10px;
283
+ padding: 1.5rem;
284
+ margin: 1rem 0;
285
+ border-left: 4px solid #6366F1;
286
  }
287
 
288
+ .ai-response {
289
+ background: linear-gradient(135deg, #E0E7FF 0%, #F3E8FF 100%);
290
+ border-radius: 15px;
291
+ padding: 1.5rem;
292
+ margin: 1rem 0;
293
+ border-left: 4px solid #6366F1;
294
  }
295
+ </style>
296
+
297
+ โ€œโ€โ€, unsafe_allow_html=True)
298
+
299
+ # ่ชž่จ€้ธๆ“‡ๅ™จ
300
+
301
+ col1, col2, col3 = st.columns([2, 1, 1])
302
+ with col3:
303
+ change_language()
304
+
305
+ # ไธปๆจ™้กŒ
306
+
307
+ header_html = fโ€โ€โ€
308
+
309
+ <div class="main-header">
310
+ <div class="compass-icon">๐Ÿงญ</div>
311
+ <h1>{get_text('title')}</h1>
312
+ <h2 style="font-size: 2rem; margin: 1rem 0;">{get_text('subtitle')}</h2>
313
+ <p style="font-size: 1.2rem; opacity: 0.9;">{get_text('features')}</p>
314
+ <div style="margin-top: 20px;">
315
+ <span style="background: rgba(255,255,255,0.2); padding: 8px 16px; border-radius: 20px; margin: 0 10px;">
316
+ โญ 15,247 users
317
+ </span>
318
+ <span style="background: rgba(255,255,255,0.2); padding: 8px 16px; border-radius: 20px; margin: 0 10px;">
319
+ ๐Ÿ’ฏ 4.9/5 rating
320
+ </span>
321
+ </div>
322
+ </div>
323
+ """
324
+ st.markdown(header_html, unsafe_allow_html=True)
325
+
326
+ # ๅ‰ฉ้ค˜้กๅบฆ้กฏ็คบ
327
+
328
+ remaining = 5 - st.session_state.daily_usage
329
+ quota_html = fโ€โ€โ€
330
+
331
+ <div class="quota-display">
332
+ ๐ŸŽซ {get_text('quota_text')}: {remaining}/5
333
+ </div>
334
+ """
335
+ st.markdown(quota_html, unsafe_allow_html=True)
336
+
337
+ # ไธปๅŠŸ่ƒฝๅ€ๅŸŸ
338
+
339
+ tab1, tab2, tab3, tab4 = st.tabs([
340
+ fโ€๐Ÿ”ฎ {get_text(โ€˜tarot_tabโ€™)}โ€,
341
+ fโ€๐Ÿ”ข {get_text(โ€˜numerology_tabโ€™)}โ€,
342
+ fโ€๐Ÿ“– {get_text(โ€˜journal_tabโ€™)}โ€,
343
+ fโ€๐Ÿค– {get_text(โ€˜ai_tabโ€™)}โ€
344
+ ])
345
+
346
+ # ๅก”็พ…ๅ ๅœๆจ™็ฑค
347
 
348
+ with tab1:
349
+ st.header(fโ€๐Ÿ”ฎ {get_text(โ€˜tarot_tabโ€™)}โ€)
350
+ st.markdown(โ€*Let ancient tarot wisdom guide your lifeโ€™s direction*โ€)
351
+
352
+ ```
353
+ question = st.text_area(
354
+ get_text('question_label'),
355
+ placeholder=get_text('question_placeholder'),
356
+ height=100
357
+ )
358
+
359
+ if question:
360
+ col1, col2 = st.columns(2)
361
 
362
+ with col1:
363
+ spread_type = st.selectbox(
364
+ "Choose Tarot Spread",
365
+ ["Single Card - Quick Guidance", "Three Cards - Past Present Future", "Love Triangle - Relationship Focus"]
366
+ )
367
 
368
+ with col2:
369
+ spread_info = {
370
+ "Single Card - Quick Guidance": "Perfect for daily guidance and simple questions",
371
+ "Three Cards - Past Present Future": "Timeline reading to understand development",
372
+ "Love Triangle - Relationship Focus": "Specialized for relationship questions"
373
+ }
374
+ st.info(spread_info[spread_type])
375
 
376
+ if st.button(get_text('start_reading'), type="primary", use_container_width=True):
377
+ if st.session_state.daily_usage >= 5:
378
+ st.error(get_text('quota_exceeded'))
379
+ else:
380
+ st.session_state.daily_usage += 1
381
+
382
+ with st.spinner("๐ŸŒŸ Drawing tarot cards for you..."):
383
+ import time
384
+ time.sleep(2)
385
+
386
+ # ๆŠฝ็‰Œ้‚่ผฏ
387
+ num_cards = 1 if "Single" in spread_type else 3
388
+ drawn_cards = random.sample(list(TAROT_CARDS.keys()), num_cards)
389
+
390
+ st.success(f"โœจ {get_text('reading_complete')}")
391
+
392
+ # ้กฏ็คบๆŠฝๅˆฐ็š„็‰Œ
393
+ cols = st.columns(len(drawn_cards))
394
+ for i, card in enumerate(drawn_cards):
395
+ with cols[i]:
396
+ is_reversed = random.choice([True, False])
397
+ status = "Reversed" if is_reversed else "Upright"
398
+ card_html = f"""
399
+ <div class="tarot-card">
400
+ <h3>{card}</h3>
401
+ <p><strong>{status}</strong></p>
402
+ <p style="font-size: 0.9rem; opacity: 0.8;">{TAROT_CARDS[card]['meaning']}</p>
403
+ </div>
404
+ """
405
+ st.markdown(card_html, unsafe_allow_html=True)
406
+
407
+ # ็”Ÿๆˆ่งฃ่ฎ€
408
+ reading_text = f"""
409
  ```
410
 
411
+ ๐Ÿ”ฎ **SoulCompass Reading for You**
412
 
413
+ **Your Question:** {question}
414
+ **Spread Used:** {spread_type}
415
+ **Cards Drawn:** {โ€™, โ€™.join(drawn_cards)}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
416
 
417
+ **Detailed Interpretation:**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
418
 
419
+ {chr(10).join([fโ€**{card}:** {TAROT_CARDS[card][โ€˜descriptionโ€™]}โ€ for card in drawn_cards])}
 
 
 
 
 
420
 
421
+ **Overall Guidance:**
422
+ The cards reveal important insights about your situation. Trust your intuition as you move forward, and remember that you have the wisdom within you to make the right choices.
423
 
424
+ ๐ŸŒŸ **Key Message:** Embrace the journey ahead with confidence and openness to new possibilities.
425
+
426
+ ๐Ÿ’ซ **Readings used today:** {st.session_state.daily_usage}/5
427
+ โ€œโ€โ€
428
 
429
  ```
430
+ reading_html = f"""
431
+ <div class="reading-result">
432
+ {reading_text.replace(chr(10), '<br>')}
433
+ </div>
434
+ """
435
+ st.markdown(reading_html, unsafe_allow_html=True)
436
+ ```
437
+
438
+ # ๆ•ธๅญ—ๅ ๅœๆจ™็ฑค
439
+
440
+ with tab2:
441
+ st.header(fโ€๐Ÿ”ข {get_text(โ€˜numerology_tabโ€™)}โ€)
442
+ st.markdown(โ€*Discover your lifeโ€™s mysteries through the power of numbers*โ€)
443
+
444
+ ```
445
+ col1, col2 = st.columns(2)
446
+
447
+ with col1:
448
+ st.subheader("๐Ÿ“… Life Path Number")
449
+ birth_date = st.date_input("Select your birth date")
450
+
451
+ if birth_date and st.button("๐ŸŒŸ Calculate Life Number"):
452
+ # ็”Ÿๅ‘ฝ้ˆๆ•ธ่จˆ็ฎ—
453
+ date_str = birth_date.strftime('%Y%m%d')
454
+ total = sum(int(digit) for digit in date_str if digit.isdigit())
455
+ while total > 9 and total not in [11, 22, 33]:
456
+ total = sum(int(digit) for digit in str(total))
457
+
458
+ life_meanings = {
459
+ 1: "The Leader - Independent, pioneering, ambitious",
460
+ 2: "The Cooperator - Diplomatic, peaceful, intuitive",
461
+ 3: "The Communicator - Creative, expressive, optimistic",
462
+ 4: "The Builder - Practical, disciplined, hardworking",
463
+ 5: "The Freedom Seeker - Adventurous, energetic, curious",
464
+ 6: "The Nurturer - Caring, responsible, family-oriented",
465
+ 7: "The Seeker - Analytical, introspective, spiritual",
466
+ 8: "The Achiever - Ambitious, organized, business-minded",
467
+ 9: "The Humanitarian - Compassionate, generous, idealistic"
468
+ }
469
+
470
+ meaning = life_meanings.get(total, "Master Number - Special spiritual significance")
471
+
472
+ result_html = f"""
473
+ <div class="feature-card">
474
+ <h3>๐ŸŒŸ Your Life Path Number: {total}</h3>
475
+ <p><strong>{meaning}</strong></p>
476
+ <p>This number represents your core personality traits and life lessons.
477
+ It reveals the path you're meant to walk in this lifetime.</p>
478
+ </div>
479
+ """
480
+ st.markdown(result_html, unsafe_allow_html=True)
481
+
482
+ with col2:
483
+ st.subheader("๐Ÿ“ Name Numerology")
484
+ name = st.text_input("Enter your full name")
485
+
486
+ if name and st.button("โœจ Analyze Name Number"):
487
+ # ็ฐกๅŒ–็š„ๅง“ๅๆ•ธๅญ—่จˆ็ฎ—
488
+ name_value = len(name) % 9 + 1
489
+
490
+ name_meanings = {
491
+ 1: "Leadership Energy - You inspire others naturally",
492
+ 2: "Harmony Energy - You bring peace and cooperation",
493
+ 3: "Creative Energy - You express joy and optimism",
494
+ 4: "Stability Energy - You provide structure and reliability",
495
+ 5: "Freedom Energy - You bring change and adventure",
496
+ 6: "Nurturing Energy - You care for and support others",
497
+ 7: "Wisdom Energy - You seek deeper understanding",
498
+ 8: "Success Energy - You achieve material accomplishment",
499
+ 9: "Service Energy - You serve the greater good"
500
+ }
501
+
502
+ meaning = name_meanings[name_value]
503
+
504
+ result_html = f"""
505
+ <div class="feature-card">
506
+ <h3>โœจ Your Name Number: {name_value}</h3>
507
+ <p><strong>{meaning}</strong></p>
508
+ <p>Your name carries this vibrational energy that influences how others
509
+ perceive you and how you express yourself in the world.</p>
510
+ </div>
511
+ """
512
+ st.markdown(result_html, unsafe_allow_html=True)
513
+ ```
514
+
515
+ # ๅฟƒ้ˆๆ—ฅ่จ˜ๆจ™็ฑค
516
+
517
+ with tab3:
518
+ st.header(fโ€๐Ÿ“– {get_text(โ€˜journal_tabโ€™)}โ€)
519
+ st.markdown(โ€*Track your emotional journey and connect with your inner self*โ€)
520
+
521
+ ```
522
+ # ไปŠๆ—ฅๅฟƒๆƒ…่จ˜้Œ„
523
+ st.subheader("๐ŸŒˆ Today's Mood Record")
524
+
525
+ col1, col2 = st.columns(2)
526
+
527
+ with col1:
528
+ mood_score = st.slider(get_text('mood_score'), 1, 10, 7)
529
+ main_emotion = st.selectbox(
530
+ "Primary emotion",
531
+ ["๐Ÿ˜Š Happy", "๐Ÿ˜” Sad", "๐Ÿ˜ฐ Anxious", "๐Ÿ˜ก Angry", "๐Ÿ˜Œ Calm", "๐Ÿค— Grateful", "๐Ÿ˜ด Tired", "๐Ÿค” Confused"]
532
  )
533
+
534
+ with col2:
535
+ energy_level = st.slider(get_text('energy_level'), 1, 10, 6)
536
+ gratitude = st.text_input("What are you grateful for today?", placeholder="Something that made you smile today...")
537
+
538
+ # ๆ—ฅ่จ˜ๅ…งๅฎน
539
+ journal_content = st.text_area(
540
+ "๐Ÿ“ Today's Soul Journal Entry",
541
+ placeholder="Write about your thoughts, feelings, experiences, or anything you want to record today...",
542
+ height=150
543
+ )
544
+
545
+ if st.button(get_text('save_journal'), type="primary"):
546
+ if journal_content:
547
+ entry = {
548
+ 'date': datetime.now().strftime('%Y-%m-%d'),
549
+ 'time': datetime.now().strftime('%H:%M'),
550
+ 'mood': mood_score,
551
+ 'emotion': main_emotion,
552
+ 'energy': energy_level,
553
+ 'gratitude': gratitude,
554
+ 'content': journal_content
555
+ }
556
+
557
+ st.session_state.journal_entries.append(entry)
558
+ st.success(get_text('journal_saved'))
559
+ st.balloons()
560
+ else:
561
+ st.warning("Please write something in your journal entry")
562
+
563
+ # ้กฏ็คบๆœ€่ฟ‘็š„ๆ—ฅ่จ˜่จ˜้Œ„
564
+ if st.session_state.journal_entries:
565
+ st.subheader("๐Ÿ“š Recent Journal Entries")
566
 
567
+ for entry in reversed(st.session_state.journal_entries[-3:]): # ้กฏ็คบๆœ€่ฟ‘3ๆข
568
+ entry_html = f"""
569
+ <div class="journal-entry">
570
+ <div style="display: flex; justify-content: space-between; align-items: center;">
571
+ <strong>{entry['date']} {entry['time']}</strong>
572
+ <span>{entry['emotion']} | Mood: {entry['mood']}/10 | Energy: {entry['energy']}/10</span>
573
+ </div>
574
+ <p style="margin: 10px 0;"><strong>Grateful for:</strong> {entry['gratitude']}</p>
575
+ <p style="margin: 10px 0; font-style: italic;">"{entry['content'][:100]}{'...' if len(entry['content']) > 100 else ''}"</p>
576
+ </div>
577
+ """
578
+ st.markdown(entry_html, unsafe_allow_html=True)
579
+ ```
580
+
581
+ # AI็™‚็™’ๅธซๆจ™็ฑค
582
+
583
+ with tab4:
584
+ st.header(fโ€๐Ÿค– {get_text(โ€˜ai_tabโ€™)}โ€)
585
+ st.markdown(โ€*24/7 soul guide providing warm support and guidance*โ€)
586
+
587
  ```
588
+ # AI็™‚็™’ๅธซไป‹็ดน
589
+ ai_intro_html = """
590
+ <div style="background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%); padding: 20px; border-radius: 15px; margin: 20px 0;">
591
+ <div style="display: flex; align-items: center; margin-bottom: 15px;">
592
+ <div style="font-size: 3rem; margin-right: 15px;">๐Ÿค–</div>
593
+ <div>
594
+ <h4 style="margin: 0; color: #6366F1;">SoulCompass AI Therapist</h4>
595
+ <p style="margin: 5px 0; color: #6B7280;">Your dedicated soul guide, always here to provide support and companionship</p>
596
+ </div>
597
+ </div>
598
+ <div style="color: #6B7280; font-size: 0.9rem;">
599
+ ๐Ÿ’ฌ Emotional supportใ€€๐Ÿง˜ Relaxation guidanceใ€€๐ŸŒฑ Growth adviceใ€€๐Ÿซ‚ 24/7 companionship
600
+ </div>
601
+ </div>
602
+ """
603
+ st.markdown(ai_intro_html, unsafe_allow_html=True)
604
+
605
+ # ๅฐ่ฉฑ้กžๅž‹้ธๆ“‡
606
+ conversation_type = st.selectbox(
607
+ "๐ŸŽฏ Choose conversation topic",
608
+ [
609
+ "๐Ÿ’ญ General Soul Conversation",
610
+ "๐Ÿ˜ฐ Stress & Anxiety Support",
611
+ "๐Ÿ’” Relationship Counseling",
612
+ "๐ŸŽฏ Life Goals Discussion",
613
+ "๐Ÿง˜ Meditation & Relaxation",
614
+ "๐ŸŒฑ Personal Growth Advice"
615
+ ]
616
+ )
617
+
618
+ # ๅฐ่ฉฑ่ผธๅ…ฅ
619
+ user_message = st.text_area(
620
+ "๐Ÿ’ฌ Share your thoughts with the AI Therapist",
621
+ placeholder="Tell me how you're feeling, or what you'd like to discuss...",
622
+ height=100
623
+ )
624
+
625
+ if user_message and st.button("๐Ÿ’ซ Start Conversation", type="primary"):
626
+ with st.spinner("๐Ÿค– AI Therapist is listening and preparing a response..."):
627
+ import time
628
+ time.sleep(1.5)
629
+
630
+ # AIๅ›žๆ‡‰็”Ÿๆˆ
631
+ responses = {
632
+ "๐Ÿ’ญ General Soul Conversation": [
633
+ f"Thank you for sharing with me. I can sense that what you've told me - '{user_message}' - comes from a place of genuine reflection. Your willingness to explore your inner world shows great courage.",
634
+ f"I hear you saying '{user_message}' and I want you to know that your feelings are completely valid. Sometimes the simple act of expressing our thoughts can be the first step toward greater clarity.",
635
+ f"What you've shared - '{user_message}' - resonates deeply. Every person's journey is unique, and I'm honored that you've chosen to share this part of yours with me."
636
+ ],
637
+ "๐Ÿ˜ฐ Stress & Anxiety Support": [
638
+ f"I understand you're experiencing stress around '{user_message}'. Anxiety can feel overwhelming, but remember - you've successfully navigated 100% of your difficult days so far. Let's breathe through this together.",
639
+ f"Your stress about '{user_message}' is completely understandable. Right now, let's focus on what you can control in this moment. Take a deep breath in for 4 counts, hold for 4, and exhale for 6.",
640
+ f"Thank you for trusting me with your anxiety about '{user_message}'. You're stronger than you realize, and this feeling will pass. Let's find some small steps to help you feel more grounded."
641
+ ],
642
+ "๐Ÿ’” Relationship Counseling": [
643
+ f"Relationships can be complex, and what you've shared about '{user_message}' shows how much you care. Love requires both vulnerability and strength - you're showing both right now.",
644
+ f"I can hear the emotion in your words about '{user_message}'. Relationships are mirrors that help us grow, even when they challenge us. Your heart's capacity for love is a gift.",
645
+ f"The situation you've described - '{user_message}' - touches on the deep human need for connection. Remember, the relationship you have with yourself sets the foundation for all others."
646
+ ]
647
+ }
648
+
649
+ response_list = responses.get(conversation_type, responses["๐Ÿ’ญ General Soul Conversation"])
650
+ ai_response = random.choice(response_list)
651
+
652
+ # ้กฏ็คบๅฐ่ฉฑ
653
+ conversation_html = f"""
654
+ <div style="margin: 20px 0;">
655
+ <div style="background: #E5E7EB; padding: 15px; border-radius: 15px 15px 5px 15px; margin-bottom: 10px;">
656
+ <strong>You:</strong> {user_message}
657
+ </div>
658
+ <div class="ai-response">
659
+ <strong>๐Ÿค– AI Therapist:</strong> {ai_response}
660
+ <br><br>
661
+ <small style="opacity: 0.8;">๐Ÿ’™ Remember: I'm here to support you, but for serious mental health concerns, please consult a professional therapist.</small>
662
+ </div>
663
+ </div>
664
+ """
665
+ st.markdown(conversation_html, unsafe_allow_html=True)
666
+ ```
667
+
668
+ # ้ ่…ณ
669
+
670
+ st.markdown(โ€โ€”โ€)
671
+ footer_html = โ€œโ€โ€
672
 
673
+ <div style="text-align: center; color: #6B7280; padding: 2rem;">
674
+ <p>๐Ÿงญ <strong>SoulCompass</strong> - Find Your Inner North Star</p>
675
+ <p>Made with โค๏ธ for seekers of wisdom and growth worldwide</p>
676
+ <div style="margin: 20px 0;">
677
+ <span style="margin: 0 15px;">๐Ÿ“ง support@soulcompass.ai</span>
678
+ <span style="margin: 0 15px;">๐ŸŒ www.soulcompass.ai</span>
679
+ <span style="margin: 0 15px;">๐Ÿ“ฑ @SoulCompassAI</span>
680
+ </div>
681
+ <p>๐Ÿ’Ž <a href="#" style="color: #6366F1; text-decoration: none;">Upgrade to Pro</a> for unlimited readings and advanced features</p>
 
 
682
  </div>
683
+ """
684
+ st.markdown(footer_html, unsafe_allow_html=True)