File size: 5,806 Bytes
9826f0b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
/* ====== MAIN APP CONTAINER AND HEADER ====== */
.page-header {
    text-align: center;
    border-radius: 22px;
    margin-bottom: 1rem;
    margin-top: 0.25rem;
}

.page-header h1 {
    margin-bottom: 1.2rem;
    margin-top: 2rem;
}

.gradio-container {
    background-image:
        linear-gradient(rgba(12, 13, 35, 0.6), rgba(12, 13, 35, 0.8)),
        url('/gradio_api/file=static/images/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-blend-mode: hard-light;

    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    padding: 20px;
}

/* ====== CHATBOT CONTAINER ====== */
.custom-chatbot,
[role="log"] {
    background: var(--bg-glass-strong) !important;
    border-radius: 22px !important;
}

/* Why is Gradio like this )): */
.block,
.form,
.gr-group {
    background: var(--bg-glass-strong);
    border-radius: 22px !important;
}

/* ====== CHAT MESSAGES ====== */
.bot,
.user {
    padding: 16px 20px;
    border-radius: 18px;
    margin: 12px 0;

    max-width: 70%;
    min-width: fit-content;
    display: inline-flex;

    border: 1px solid var(--border-soft);
    box-shadow: 0 4px 20px rgba(122, 162, 255, 0.2);

    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    box-sizing: border-box;
}

.bot {
    background: var(--bot-message);
    color: var(--text-main);
    margin-right: auto;
    margin-left: 0;
}

.user {
    background: var(--user-message);
    color: white;
    margin-left: auto;
    margin-right: 0;
}

/* ====== CHAT INPUT AREA ====== */
.gr-text-input,
[data-testid="textbox"] {
    background: rgba(40, 24, 65, 0.6) !important;
    border-radius: 18px !important;
    border: 1px solid var(--border-soft) !important;
    min-height: 60px !important;
    height: auto !important;
    margin-right: 12px !important;
    box-shadow: 0 0 10px rgba(255, 124, 229, 0.1);
}

.gr-text-input:hover,
textarea:hover {
    box-shadow: 0 0 15px var(--accent-glow) !important;
    transition: box-shadow 0.3s ease !important;
}

.gr-text-input:focus,
textarea:focus {
    box-shadow: 0 0 20px var(--accent-glow) !important;
    outline: none !important;
    transition: box-shadow 0.3s ease !important;
}

textarea {
    background: transparent !important;
    color: var(--text-main) !important;
    border: none !important;
    border-radius: 16px !important;
    padding: 16px 20px !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    min-height: 60px !important;
    height: auto !important;
    resize: vertical !important;
    overflow-y: auto !important;
    max-height: 200px !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
}

textarea::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.75 !important;
}

/* ====== BUTTON STUFF ====== */
button[data-testid="login-button"],
.submit-button {
    background: var(--btn-bg);
    border: none !important;
    border-radius: 16px !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 16px 28px !important;
    min-height: 60px !important;
    box-shadow: none;
    cursor: pointer !important;
}

.submit-button:hover,
.submit-button:focus-visible {
    box-shadow: 0 0 18px var(--accent-glow);
    transform: translateY(-1px);
    filter: brightness(1.05);
}

/* Sidebar buttons */
.sidebar button {
    background: linear-gradient(135deg, #ff7ce5, #7ac5ff) !important;
}

.sidebar button:hover {
    background: linear-gradient(135deg, #ff9de0, #7ac5ff) !important;
}

/* Toggle Buttons */
.block.toggle-button {
    margin-left: auto !important;
    margin-right: auto !important;
    width: fit-content;
}

.toggle-button input[type="checkbox"] {
    display: none;
}

.toggle-button label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;

    padding: 0.65rem 1.2rem;
    border-radius: 999px;
    cursor: pointer;

    font-weight: 600;
    letter-spacing: 0.02em;

    background: var(--btn-bg);
    color: var(--btn-text);
    border: 1px solid var(--btn-border);

    transition:
        background 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.toggle-button label:hover {
    background: var(--btn-bg-hover);
    box-shadow: 0 0 22px rgba(122, 197, 255, 0.7);
}

.toggle-button label:has(input:checked) {
    background: var(--btn-bg-active);
    box-shadow: 0 0 28px rgba(122, 197, 255, 0.9);
}

/* Add the word ON in green text if enabled local model */
.toggle-button label:has(input:checked)::after {
    content: " ON";
    font-weight: 700;
    color: #4cffc3;
    margin-left: 0.3rem;
    text-shadow: 0 0 6px rgba(76, 255, 195, 0.8);
}

.toggle-button label:active {
    transform: scale(0.96);
}

/* ====== SLIDERS ====== */
.custom-slider input[type="range"]::-webkit-slider-thumb {
    background: var(--accent-secondary) !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    border: 2px solid white !important;
    box-shadow: 0 0 12px var(--accent-glow);
}

.custom-slider input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 8px;
    background: linear-gradient(120deg, var(--accent-primary), var(--accent-secondary));
}

/* ====== SIDEBAR ====== */
.sidebar {
    background-image:
        linear-gradient(rgba(20, 24, 55, 0.4), rgba(20, 24, 55, 0.4)),
        url('/gradio_api/file=static/images/sidebar.jpg');
    background-size: auto, cover;
    background-position: top left, center;
    background-repeat: no-repeat, no-repeat;

    border-right: 1px solid var(--border-soft) !important;
    backdrop-filter: blur(15px);
    padding: 20px !important;
}