Shubham170793 commited on
Commit
491c117
·
verified ·
1 Parent(s): 0317280

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +20 -39
src/streamlit_app.py CHANGED
@@ -88,28 +88,32 @@ 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 — 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;
@@ -118,18 +122,17 @@ p, label, .stMarkdown, .stRadio label {
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;
@@ -138,7 +141,7 @@ p, label, .stMarkdown, .stRadio label {
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,7 +150,10 @@ p, label, .stMarkdown, .stRadio label {
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 {
@@ -155,31 +161,6 @@ p, label, .stMarkdown, .stRadio label {
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
 
 
88
  return ["How do I start using this guide?", "What does this document cover?"]
89
 
90
  # ==========================================================
91
+ # 🎨 STYLING — FIXED CONTRAST (UNIVERSAL MODE)
92
  # ==========================================================
93
  st.markdown("""
94
  <style>
95
+ /* Lock background so light mode users don't see faded text */
96
+ html, body, .stApp {
97
+ background-color: #111827 !important;
98
+ color: #e5e7eb !important;
99
+ }
100
+
101
+ /* Main content area */
102
  div.block-container {
103
  padding-top: 1.2rem;
104
  max-width: 1080px;
105
+ background-color: #111827 !important;
106
  }
107
 
108
+ /* Headings and section titles */
109
  h1, h2, h3 {
110
+ color: #f1f5f9 !important;
111
  font-weight: 600;
 
 
 
 
112
  }
113
 
114
  /* Suggestion chips */
115
  .suggest-chip {
116
+ background: #1e293b;
117
  border: 1px solid #374151;
118
  border-radius: 14px;
119
  color: #e2e8f0;
 
122
  font-size: 13px;
123
  margin: 6px 6px 6px 0;
124
  display: inline-block;
125
+ transition: background 0.2s, transform 0.1s;
126
  }
127
  .suggest-chip:hover {
128
  background: #2563eb;
129
  color: #fff;
 
130
  transform: translateY(-2px);
131
  }
132
 
133
+ /* Answer box */
134
  .answer-box {
135
+ background: linear-gradient(180deg,#131a2a,#0f1628);
136
  border-left: 4px solid #3b82f6;
137
  border-radius: 10px;
138
  padding: 16px 18px;
 
141
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
142
  }
143
 
144
+ /* Input box */
145
  .stTextInput > div > div > input {
146
  background-color: #0f172a !important;
147
  color: #f1f5f9 !important;
 
150
  padding: 8px 10px !important;
151
  font-size: 15px !important;
152
  }
153
+ .stTextInput > label {
154
+ font-weight: 500;
155
+ color: #e5e7eb !important;
156
+ }
157
 
158
  /* Links */
159
  .small-link {
 
161
  color: #60a5fa;
162
  cursor: pointer;
163
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  </style>
165
  """, unsafe_allow_html=True)
166