File size: 4,185 Bytes
4ec8214
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
739faf3
4ec8214
739faf3
4ec8214
 
 
739faf3
 
4ec8214
 
 
739faf3
 
 
 
 
4ec8214
 
 
739faf3
 
 
 
4ec8214
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7ef546c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9b47bf9
 
 
 
 
 
 
4d2b5bf
9b47bf9
4d2b5bf
 
9b47bf9
 
 
 
4d2b5bf
9b47bf9
977d62d
a5e1aa1
bb16f9b
 
2fd8a81
bb16f9b
2fd8a81
 
 
bb16f9b
 
 
7e0c90f
2fd8a81
 
 
bb16f9b
7e0c90f
2fd8a81
 
bb16f9b
 
2fd8a81
 
 
 
 
 
 
 
 
 
 
d63b07e
 
 
 
 
2fd8a81
33ff0ba
 
 
 
 
 
 
 
 
a5e1aa1
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
  body {
      font-family: 'Roboto', sans-serif;
      background: #121212;
      color: #ffffff;
      margin: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
      padding: 0 16px;
    }

    .chat-container {
      background: #1f1f1f;
      border-radius: 12px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
      padding: 20px;
      max-width: 700px;
      width: 100%;
      display: flex;
      flex-direction: column;
    }

    h2 {
      text-align: center;
      color: #bb86fc;
      margin-bottom: 20px;
      font-weight: 500;
    }

    .chat-box {
      flex-grow: 1;
      max-height: 420px;
      overflow-y: auto;
      padding: 12px;
      border: 1px solid #2d2d2d;
      border-radius: 8px;
      background: #2a2a2a;
      margin-bottom: 16px;
      display: flex;
  flex-direction: column;
    }
.message {
  display: block; /* ensures full-width layout */
  width: fit-content;
  max-width: 85%;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.5;
  word-wrap: break-word;
}

.message.user {
  align-self: flex-end;
  margin-left: auto;
  background: #333c4d;
  color: #e3f2fd;
  border-bottom-right-radius: 0;
}

.message.assistant {
  align-self: flex-start;
  margin-right: auto;
  background: #383838;
  border-bottom-left-radius: 0;
}

    .text-content {
      white-space: pre-wrap;
    }

    .input-area {
      display: flex;
      gap: 10px;
    }

    textarea {
      flex-grow: 1;
      padding: 10px 12px;
      resize: none;
      border-radius: 6px;
      background: #2a2a2a;
      color: #fff;
      border: 1px solid #444;
      font-size: 14px;
    }

    button {
      background: #6200ee;
      color: white;
      border: none;
      border-radius: 6px;
      padding: 10px 16px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.3s;
    }

    button:hover {
      background: #3700b3;
    }

    .typing-indicator {
      display: flex;
      gap: 6px;
      margin: 6px 0 12px;
    }

    .dot {
      width: 8px;
      height: 8px;
      background-color: #bb86fc;
      border-radius: 50%;
      animation: blink 1.4s infinite both;
    }

    .dot:nth-child(2) {
      animation-delay: 0.2s;
    }

    .dot:nth-child(3) {
      animation-delay: 0.4s;
    }

    @keyframes blink {
      0%, 80%, 100% { opacity: 0.2; }
      40% { opacity: 1; }
    }

    .code-block {
      position: relative;
      background: #1e1e1e;
      color: #eee;
      padding: 12px;
      border-radius: 8px;
      margin-top: 8px;
    }

    .copy-btn {
      position: absolute;
      top: 8px;
      right: 12px;
      background: #444;
      color: #fff;
      border: none;
      padding: 4px 8px;
      font-size: 12px;
      border-radius: 4px;
      cursor: pointer;
    }

    .copy-btn:hover {
      background: #666;
    }

    @media (max-width: 600px) {
      .chat-box {
        max-height: 60vh;
      }

      button {
        padding: 8px 14px;
      }
    }

    .timestamp {
  font-size: 11px;
  color: #aaa;
  margin-top: 4px;
  display: block;
}

.timestamp.user {
  text-align: right;
}

.timestamp.assistant {
  text-align: left;
}

.code-line {
  display: flex;
}

.line-number {
  width: 30px;
  color: #888;
  text-align: right;
  padding-right: 12px;
  user-select: none;
}

.line-content {
  flex-grow: 1;
  white-space: pre-wrap;
}

.code-block-wrapper {
  position: relative;
  background: #2d2d2d;
  border-radius: 8px;
  margin: 10px 0;
  padding-top: 1.5em;
  overflow: auto;
}

.language-label {
  position: absolute;
  top: 0;
  right: 10px;
  background: #444;
  color: #fff;
  padding: 2px 8px;
  font-size: 0.75em;
  border-bottom-left-radius: 4px;
}

.copy-btn {
  position: absolute;
  top: 0;
  left: 10px;
  background: transparent;
  color: white;
  border: none;
  font-size: 0.9em;
  cursor: pointer;
}

pre[class*="language-"] {
  white-space: pre-wrap !important;
  word-break: break-word;
  overflow-x: auto;
}

.chat-image {
  max-width: 100%;
  height: auto;
  margin-top: 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}