File size: 7,615 Bytes
ca1ea49
 
 
f639e70
 
 
 
 
 
 
 
 
 
 
 
 
 
ca1ea49
f639e70
 
ca1ea49
 
 
 
 
f639e70
 
ca1ea49
 
 
f639e70
 
ca1ea49
f639e70
 
ca1ea49
 
 
 
 
 
 
 
f639e70
ca1ea49
 
 
 
 
 
 
 
 
 
 
f639e70
 
ca1ea49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f639e70
ca1ea49
f639e70
 
 
ca1ea49
 
 
 
f639e70
 
 
 
 
 
 
 
 
ca1ea49
f639e70
ca1ea49
f639e70
 
ca1ea49
f639e70
ca1ea49
f639e70
 
 
ca1ea49
f639e70
 
 
 
ca1ea49
f639e70
 
 
 
 
 
ca1ea49
f639e70
 
ca1ea49
f639e70
 
 
 
 
 
 
 
ca1ea49
 
 
 
 
 
 
 
 
 
 
 
 
f639e70
 
ca1ea49
f639e70
 
 
 
ca1ea49
f639e70
 
ca1ea49
f639e70
 
 
 
 
 
 
 
 
 
 
ca1ea49
 
f639e70
 
 
 
 
 
ca1ea49
f639e70
ca1ea49
f639e70
 
 
 
 
 
 
 
 
ca1ea49
f639e70
 
 
 
 
 
 
 
 
ca1ea49
 
f639e70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ca1ea49
f639e70
 
 
 
 
 
 
 
ca1ea49
 
f639e70
 
ca1ea49
 
 
f639e70
ca1ea49
 
 
f639e70
 
 
 
 
ca1ea49
f639e70
 
 
 
 
 
 
 
 
ca1ea49
f639e70
ca1ea49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f639e70
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
/* ===================================================================
   1. GLOBAL VARIABLES & RESET
   ================================================================= */
:root {
    --bg-deep-dark: #0a192f;
    --bg-medium-dark: #172a46;
    --bg-light-dark: #2c3e50;
    --text-bright: #ccd6f6;
    --text-normal: #bdc3c7;
    --text-muted: #8892b0;
    --accent-primary: #64ffda;
    --accent-primary-darker: #52d3b4;
    --accent-primary-text: #0a192f;
    --border-color: #304a6e;
    --card-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-deep-dark);
    color: var(--text-normal);
    /* Vital for a full-screen chat app layout */
    height: 100vh; 
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent body scroll, only chat window scrolls */
}

a { text-decoration: none; color: inherit; }

/* ===================================================================
   2. HEADER & NAVIGATION (Responsive)
   ================================================================= */
header {
    background-color: var(--bg-medium-dark);
    padding: 1rem 5%;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0; /* Header never shrinks */
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-primary);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--text-normal);
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s;
    font-size: 0.95rem;
}

nav a:hover, nav a.active {
    color: var(--accent-primary);
    border-bottom: 2px solid var(--accent-primary);
}

/* ===================================================================
   3. MAIN CHAT LAYOUT
   ================================================================= */
main {
    flex-grow: 1; /* Takes up all remaining vertical space */
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    overflow: hidden; /* Contains the scrollable chat area */
}

.chat-container {
    background-color: var(--bg-medium-dark);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%; /* Fills the main area */
    overflow: hidden;
    position: relative;
}

/* --- Header Area --- */
.chat-header {
    padding: 15px 20px;
    background-color: var(--bg-light-dark);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    flex-shrink: 0;
}

.chat-header h1 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--accent-primary);
}

.chat-header p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- Chat Window (Scrollable Area) --- */
.chat-window {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
    background-color: rgba(10, 25, 47, 0.5); /* Subtle inner shadow */
}

/* Custom Scrollbar */
.chat-window::-webkit-scrollbar {
    width: 8px;
}
.chat-window::-webkit-scrollbar-track {
    background: var(--bg-deep-dark);
}
.chat-window::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* --- Messages --- */
.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease-in;
    font-size: 0.95rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bot-message {
    align-self: flex-start;
    background-color: var(--bg-light-dark);
    color: var(--text-bright);
    border-bottom-left-radius: 2px;
    border: 1px solid var(--border-color);
}

.user-message {
    align-self: flex-end;
    background-color: var(--accent-primary);
    color: var(--accent-primary-text);
    border-bottom-right-radius: 2px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(100, 255, 218, 0.2);
}

/* --- Input Area --- */
.chat-input-area {
    display: flex;
    padding: 15px;
    background-color: var(--bg-light-dark);
    border-top: 1px solid var(--border-color);
    gap: 10px;
    flex-shrink: 0;
}

#user-input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background-color: var(--bg-deep-dark);
    color: var(--text-bright);
    font-size: 1rem; /* Keeps iOS from zooming in */
    transition: border-color 0.3s;
}

#user-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.chat-input-area button {
    background-color: var(--accent-primary);
    color: var(--accent-primary-text);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.2s;
    flex-shrink: 0;
}

.chat-input-area button:hover {
    background-color: var(--accent-primary-darker);
    transform: scale(1.05);
}

.chat-input-area button svg {
    width: 20px;
    height: 20px;
}

/* ===================================================================
   4. CONTENT FORMATTING (Markdown Support)
   ================================================================= */
.bot-message ul, .bot-message ol {
    margin: 8px 0 !important;
    padding-left: 20px !important;
    list-style-type: disc !important;
    display: block !important;
}

.bot-message li {
    margin-bottom: 4px !important;
    display: list-item !important;
}

.bot-message b, .bot-message strong {
    color: var(--accent-primary);
    font-weight: 700;
}

.bot-message i {
    opacity: 0.8;
    font-size: 0.85em;
    display: block;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===================================================================
   5. RESPONSIVE MEDIA QUERIES
   ================================================================= */

/* Tablet & Mobile Navigation */
@media (max-width: 900px) {
    header { padding: 0.75rem 5%; }
    
    nav {
        flex-direction: column;
        gap: 0.75rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        width: 100%;
    }
}

/* Mobile Phones (Full Screen Chat Experience) */
@media (max-width: 600px) {
    main {
        padding: 0; /* Remove padding to make it edge-to-edge */
        margin: 0;
        max-width: 100%;
        /* Calculate height carefully to fit between header and bottom */
        height: auto; 
    }

    .chat-container {
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }

    .chat-header {
        padding: 10px 15px;
    }

    .chat-window {
        padding: 15px;
    }

    .message {
        max-width: 85%; /* Slightly wider bubbles on small screens */
    }

    .chat-input-area {
        padding: 10px;
    }

    #user-input {
        padding: 10px 15px;
    }
    
    .chat-input-area button {
        width: 40px;
        height: 40px;
    }
}