Shubham170793 commited on
Commit
0317280
·
verified ·
1 Parent(s): 6241bc0

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +63 -12
src/streamlit_app.py CHANGED
@@ -88,34 +88,57 @@ Output: Write each question on a new line. Do not invent facts — base question
88
  return ["How do I start using this guide?", "What does this document cover?"]
89
 
90
  # ==========================================================
91
- # 🎨 STYLING — MINIMAL ENTERPRISE DESIGN
92
  # ==========================================================
93
  st.markdown("""
94
  <style>
95
- div.block-container {padding-top: 1.2rem; max-width: 1080px;}
96
- h1, h2, h3 {color: #f3f4f6; font-weight: 600;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  .suggest-chip {
98
- background: #0f1724;
99
  border: 1px solid #374151;
100
  border-radius: 14px;
101
- color: #e6eef8;
102
  padding: 8px 12px;
103
  cursor: pointer;
104
  font-size: 13px;
105
  margin: 6px 6px 6px 0;
106
  display: inline-block;
107
- transition: background 0.2s, transform 0.1s;
 
 
 
 
 
 
108
  }
109
- .suggest-chip:hover {background: #1e3a8a; transform: translateY(-2px);}
 
110
  .answer-box {
111
- background: linear-gradient(180deg,#0b1220,#071027);
112
  border-left: 4px solid #3b82f6;
113
- border-radius: 8px;
114
  padding: 16px 18px;
115
- color: #e6eef8;
116
  margin-top: 12px;
117
- box-shadow: 0 4px 14px rgba(0,0,0,0.35);
118
  }
 
 
119
  .stTextInput > div > div > input {
120
  background-color: #0f172a !important;
121
  color: #f1f5f9 !important;
@@ -124,15 +147,43 @@ h1, h2, h3 {color: #f3f4f6; font-weight: 600;}
124
  padding: 8px 10px !important;
125
  font-size: 15px !important;
126
  }
127
- .stTextInput > label {font-weight: 500;}
 
 
128
  .small-link {
129
  font-size: 13px;
130
  color: #60a5fa;
131
  cursor: pointer;
132
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  </style>
134
  """, unsafe_allow_html=True)
135
 
 
136
  # ==========================================================
137
  # 🧭 SIDEBAR
138
  # ==========================================================
 
88
  return ["How do I start using this guide?", "What does this document cover?"]
89
 
90
  # ==========================================================
91
+ # 🎨 STYLING — NEUTRAL ENTERPRISE THEME (SLEEK + LIGHT-MODE SAFE)
92
  # ==========================================================
93
  st.markdown("""
94
  <style>
95
+ div.block-container {
96
+ padding-top: 1.2rem;
97
+ max-width: 1080px;
98
+ }
99
+
100
+ /* Headings and general text */
101
+ h1, h2, h3 {
102
+ color: #f1f5f9;
103
+ font-weight: 600;
104
+ letter-spacing: -0.2px;
105
+ }
106
+ p, label, .stMarkdown, .stRadio label {
107
+ color: #e5e7eb !important;
108
+ }
109
+
110
+ /* Suggestion chips */
111
  .suggest-chip {
112
+ background: #111827;
113
  border: 1px solid #374151;
114
  border-radius: 14px;
115
+ color: #e2e8f0;
116
  padding: 8px 12px;
117
  cursor: pointer;
118
  font-size: 13px;
119
  margin: 6px 6px 6px 0;
120
  display: inline-block;
121
+ transition: background 0.2s, transform 0.1s, box-shadow 0.1s;
122
+ }
123
+ .suggest-chip:hover {
124
+ background: #2563eb;
125
+ color: #fff;
126
+ box-shadow: 0 2px 6px rgba(37,99,235,0.3);
127
+ transform: translateY(-2px);
128
  }
129
+
130
+ /* Answer box — softer contrast, same depth */
131
  .answer-box {
132
+ background: linear-gradient(180deg, #131a2a, #0f1628);
133
  border-left: 4px solid #3b82f6;
134
+ border-radius: 10px;
135
  padding: 16px 18px;
136
+ color: #e5e7eb;
137
  margin-top: 12px;
138
+ box-shadow: 0 3px 10px rgba(0,0,0,0.25);
139
  }
140
+
141
+ /* Input box refinement */
142
  .stTextInput > div > div > input {
143
  background-color: #0f172a !important;
144
  color: #f1f5f9 !important;
 
147
  padding: 8px 10px !important;
148
  font-size: 15px !important;
149
  }
150
+ .stTextInput > label {font-weight: 500; color: #e5e7eb;}
151
+
152
+ /* Links */
153
  .small-link {
154
  font-size: 13px;
155
  color: #60a5fa;
156
  cursor: pointer;
157
  }
158
+
159
+ /* Light-mode safety: ensure readability if user’s browser is light */
160
+ @media (prefers-color-scheme: light) {
161
+ body, .stApp {
162
+ background-color: #f9fafb !important;
163
+ color: #111827 !important;
164
+ }
165
+ h1, h2, h3, label { color: #111827 !important; }
166
+ .answer-box {
167
+ background: #ffffff !important;
168
+ border-left: 4px solid #2563eb !important;
169
+ color: #1f2937 !important;
170
+ box-shadow: 0 2px 8px rgba(0,0,0,0.08);
171
+ }
172
+ .suggest-chip {
173
+ background: #e5e7eb;
174
+ border: 1px solid #d1d5db;
175
+ color: #111827;
176
+ }
177
+ .suggest-chip:hover {
178
+ background: #2563eb;
179
+ color: #fff;
180
+ box-shadow: 0 2px 5px rgba(37,99,235,0.25);
181
+ }
182
+ }
183
  </style>
184
  """, unsafe_allow_html=True)
185
 
186
+
187
  # ==========================================================
188
  # 🧭 SIDEBAR
189
  # ==========================================================