-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
540 lines (491 loc) · 16.6 KB
/
style.css
File metadata and controls
540 lines (491 loc) · 16.6 KB
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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
/* Общие стили */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background-color: #1c1c1e; /* Темный фон как в приложении */
color: #ffffff;
margin: 0;
padding: 20px;
display: flex;
justify-content: center;
align-items: flex-start; /* Чтобы при коротком контенте не растягивалось на всю высоту */
min-height: 100vh;
box-sizing: border-box;
overflow-y: auto; /* Добавляет прокрутку, если текст не помещается */
}
.app-container {
width: 100%;
background-color: transparent; /* Основной фон body */
border-radius: 15px;
/* border: 2px solid #0a84ff; */ /* Убираем общую рамку */
/* padding: 20px; */ /* Убираем общий padding, если он не нужен без рамки */
/* box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); */
margin-top: 0;
}
.card {
background-color: #2c2c2e; /* Цвет карточек как в приложении */
padding: 20px;
border-radius: 15px;
margin-bottom: 20px;
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.app-header {
text-align: center;
margin-bottom: 25px;
padding-bottom: 15px;
border-bottom: 1px solid #3a3a3c;
}
.app-header h1 {
color: #0a84ff; /* Акцентный цвет */
font-size: 28px;
margin-bottom: 5px;
}
.app-header p {
color: #86868b; /* Вторичный текст */
font-size: 14px;
margin-top: 0;
}
/* Стили для элементов ввода */
.input-section {
max-width: 800px;
margin-left: auto;
margin-right: auto;
}
.input-section label, .product-input-container p {
display: block;
margin-bottom: 8px;
font-size: 14px;
color: #f0f0f0;
}
.input-section input[type="text"] {
width: calc(100% - 20px); /* Учитываем padding */
padding: 10px;
margin-bottom: 15px;
border: 1px solid #39393d;
background-color: #39393d; /* Фон поля ввода */
color: #ffffff;
border-radius: 8px;
font-size: 14px;
box-sizing: border-box;
}
.input-section input[type="text"]::placeholder {
color: #86868b;
}
.mode-switcher {
margin-bottom: 20px;
display: flex;
gap: 20px;
}
.mode-switcher label {
display: flex;
align-items: center;
gap: 5px;
font-size: 14px;
color: #e0e0e0;
cursor: pointer;
}
.mode-switcher input[type="radio"] {
accent-color: #0a84ff;
}
.product-input-container {
margin-bottom: 10px;
}
.product-entry {
margin-bottom: 10px;
}
.product-entry label {
font-size: 13px;
color: #c0c0c0;
margin-bottom: 4px;
}
/* Кнопки */
.analyze-button, .secondary-button, .back-button, .clear-history-button, .history-item-button {
display: block;
width: 100%;
padding: 12px;
border: none;
border-radius: 10px;
font-size: 15px;
font-weight: bold;
cursor: pointer;
transition: background-color 0.2s ease;
text-align: center;
box-sizing: border-box; /* Чтобы padding не увеличивал ширину */
}
.analyze-button {
background-color: #0a84ff; /* Акцентный цвет */
color: white;
margin-top: 20px;
margin-bottom: 10px;
}
.analyze-button:hover {
background-color: #0069d9;
}
.secondary-button {
background-color: #4a4a4c;
color: white;
margin-bottom: 10px;
}
.secondary-button:hover {
background-color: #5a5a5c;
}
.analysis-time-note {
font-size: 12px;
color: #86868b;
text-align: center;
margin-top: 15px;
}
/* Оверлей загрузки */
.loading-overlay {
position: fixed; /* Или absolute, если родитель имеет position: relative */
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(44, 44, 46, 0.85); /* Полупрозрачный фон карточки */
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
flex-direction: column; /* Для центрирования контента */
}
.loading-content {
background-color: #2c2c2e; /* Цвет карточки */
padding: 30px 40px;
border-radius: 15px;
text-align: center;
box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}
.loading-spinner {
border: 4px solid #f3f3f330; /* Light grey */
border-top: 4px solid #0a84ff; /* Accent color */
border-radius: 50%;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
margin: 0 auto 20px auto;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
#loadingMessage {
font-size: 16px;
color: #e0e0e0;
margin-bottom: 15px;
}
.progress-bar-container {
width: 80%;
max-width: 250px;
background-color: #39393d;
border-radius: 5px;
margin: 10px auto 0 auto;
height: 10px;
overflow: hidden; /* Скрываем выходящую часть прогресс-бара */
}
.progress-bar {
width: 0%; /* Начальная ширина */
height: 100%;
background-color: #0a84ff; /* Акцентный цвет */
border-radius: 5px;
transition: width 0.2s ease-out;
}
/* Секция результатов */
.results-section {
padding-top: 15px;
position: relative; /* Для корректного позиционирования кнопки назад */
}
.results-section h2 {
color: #f0f0f0;
font-size: 20px;
margin-top: 0;
/* margin-bottom: 15px; Заголовок продукта будет управлять отступом */
/* border-bottom: 1px solid #3a3a3c; Убираем, чтобы заголовок товара был чище*/
/* padding-bottom: 10px; */
}
#singleResultContainer h2 { /* Заголовок для одиночного товара */
margin-left: 100px; /* Оставляем место для кнопки Назад */
margin-right: 15px; /* Отступ справа */
margin-bottom: 15px; /* Отступ снизу до текста анализа */
padding-top: 5px; /* Небольшой отступ сверху, чтобы кнопка Назад не прилипала */
line-height: 1.3;
}
.analysis-text {
background-color: #1c1c1e; /* Чуть темнее карточки для контраста */
padding: 15px;
border-radius: 8px;
font-size: 14px;
line-height: 1.6;
color: #e0e0e0;
white-space: pre-wrap; /* Сохраняет переносы строк и пробелы */
min-height: 200px; /* Минимальная высота, чтобы было куда смотреть */
max-height: 70vh; /* Максимум 70% высоты видимой области окна */
overflow-y: auto; /* Добавляет прокрутку, если текст не помещается */
/* border: 2px solid #0a84ff; */ /* Синяя рамка для блока с текстом анализа УБРАНА */
margin-top: 10px; /* Добавил отступ сверху, если перед ним заголовок */
}
#singleResultContainer .analysis-text {
margin-top: 0; /* Для одиночного товара отступ сверху не нужен, т.к. он после заголовка */
background-color: #2c2c2e; /* Возвращаем фон как у карточки для одиночного результата */
border: 2px solid #0a84ff; /* ВОЗВРАЩАЕМ СИНЮЮ РАМКУ */
}
.back-button {
position: absolute; /* Абсолютное позиционирование относительно .results-section */
top: 20px; /* Отступ сверху в .results-section */
left: 20px; /* Отступ слева в .results-section */
width: auto; /* Не на всю ширину */
padding: 8px 18px;
font-size: 13px;
background-color: #3a3a3c;
color: white;
/* float: left; Убираем float */
/* margin-bottom: 10px; Управляется через отступ заголовка и контейнера */
}
.back-button:hover {
background-color: #4a4a4c;
}
/* Стили для сравнения товаров */
#comparisonResultContainer {
/* Стили, если нужны специфичные для контейнера сравнения */
}
#comparisonOverallTitle {
font-size: 22px;
margin-bottom: 20px;
text-align: center;
padding-top: 5px; /* Отступ сверху для кнопки Назад, если она активна на этом экране */
margin-left: 100px; /* Место для кнопки Назад */
margin-right: 15px;
}
.comparison-columns {
display: flex;
gap: 15px; /* Пространство между колонками */
margin-bottom: 20px;
}
.comparison-column {
flex: 1; /* Равномерное распределение пространства */
background-color: #39393d; /* Цвет фона колонки */
padding: 15px;
border-radius: 10px;
border: 2px solid #0a84ff; /* ВОЗВРАЩАЕМ СИНЮЮ РАМКУ */
display: flex; /* Для управления высотой текстового блока */
flex-direction: column; /* Чтобы элементы шли друг под другом */
}
.comparison-column h4 {
color: #0a84ff; /* Акцентный цвет для заголовка товара в колонке */
font-size: 16px;
margin-top: 0;
margin-bottom: 8px;
border-bottom: 1px solid #4a4a4c;
padding-bottom: 8px;
}
.review-count-comparison {
font-size: 11px;
color: #86868b;
margin-bottom: 10px;
}
.comparison-column .analysis-text { /* Переопределяем для колонок, если нужно */
background-color: #39393d; /* Фон текста анализа в колонке такой же как у колонки */
/* max-height: 300px; Убрали, будет управляться flex-grow */
flex-grow: 1; /* Позволяет текстовому блоку занимать доступное пространство */
min-height: 150px; /* Минимальная высота, чтобы колонка не схлопывалась */
border: none; /* Убираем индивидуальную рамку у текста, если она была */
}
.recommendation-card {
background-color: #39393d;
padding: 15px;
border-radius: 10px;
margin-top: 20px;
border: 2px solid #0a84ff; /* ВОЗВРАЩАЕМ СИНЮЮ РАМКУ */
}
.recommendation-card h3 {
font-size: 18px;
color: #0a84ff;
margin-top: 0;
margin-bottom: 10px;
}
.recommendation-card .analysis-text { /* Стили для текста в карточке рекомендаций */
background-color: #39393d; /* Фон такой же как у карточки */
border: none; /* Убираем индивидуальную рамку у текста */
}
.emoji-title {
margin-right: 5px;
}
/* Секция истории */
.history-section {
position: relative; /* Для кнопки назад и clear */
}
.history-section h2 {
text-align: center;
margin-bottom: 20px; /* Отступ под заголовком */
margin-top: 50px; /* Отступ над заголовком, чтобы вместить кнопки */
}
.history-list {
max-height: 400px;
overflow-y: auto;
}
.history-item {
background-color: #39393d;
padding: 12px 15px;
border-radius: 8px;
margin-bottom: 10px;
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
transition: background-color 0.2s;
}
.history-item:hover {
background-color: #4a4a4c;
}
.history-item-info {
flex-grow: 1;
}
.history-item-title {
font-size: 15px;
color: #e0e0e0;
margin-bottom: 3px;
}
.history-item-type {
font-size: 12px;
color: #0a84ff; /* Акцентный синий цвет для типа анализа в истории */
font-weight: bold; /* Выделение типа анализа жирным шрифтом */
}
.history-item-timestamp {
font-size: 12px;
color: #86868b;
}
.history-item-actions button {
margin-left: 8px;
padding: 6px 10px;
font-size: 12px;
border-radius: 6px;
}
.history-item-actions {
display: flex;
flex-direction: column; /* Располагаем кнопки вертикально */
gap: 8px; /* Добавляем отступ между кнопками */
margin-left: 10px; /* Небольшой отступ слева от блока с информацией */
}
.history-item-button {
width: auto;
font-weight: normal;
}
.view-history-btn {
background-color: #0a84ff;
color: white;
}
.view-history-btn:hover {
background-color: #0069d9;
}
.delete-history-btn {
background-color: #e74c3c; /* Красный для опасных действий */
color: white;
}
.delete-history-btn:hover {
background-color: #c0392b;
}
.clear-history-button {
background-color: #e74c3c; /* Красный для опасных действий */
color: white;
position: absolute; /* Позиционирование относительно .history-section */
top: 20px;
right: 20px;
width: auto;
padding: 8px 18px;
font-size: 13px;
/* margin-bottom: 15px; */ /* Убрано, т.к. абсолютное позиционирование */
}
.clear-history-button:hover {
background-color: #c0392b;
}
.clear-history-button:disabled {
background-color: #808080;
cursor: not-allowed;
}
#noHistoryMessage {
text-align: center;
color: #86868b;
padding: 20px;
}
/* Адаптивность */
@media (max-width: 768px) {
.comparison-columns {
flex-direction: column; /* Колонки друг под другом на малых экранах */
}
.app-header h1 {
font-size: 24px;
}
.analyze-button, .secondary-button {
font-size: 14px;
}
body {
padding: 10px;
}
.card {
padding: 15px;
}
#singleResultContainer h2, #comparisonOverallTitle {
margin-left: 80px; /* Меньше места для кнопки назад на мобильных */
font-size: 18px;
}
.back-button {
top: 15px;
left: 15px;
}
.clear-history-button {
top: 15px;
right: 15px;
}
.history-section h2 {
margin-top: 60px; /* Увеличиваем, чтобы кнопки точно влезли */
}
}
@media (max-width: 480px) {
.mode-switcher {
flex-direction: column;
gap: 10px;
align-items: flex-start;
}
.back-button, .clear-history-button {
width: calc(100% - 30px); /* Чтобы вписывались в padding карточки */
position: static; /* Возвращаем в поток для мобильных */
float: none;
margin-bottom: 10px;
}
.history-section .back-button { /* Кнопка Назад в истории */
margin-top: 0; /* Убираем лишний отступ сверху на мобильных */
}
.history-item {
flex-direction: column;
align-items: flex-start;
}
.history-item-actions {
margin-top: 10px;
width: 100%;
display: flex;
flex-direction: row; /* На маленьких экранах возвращаем в ряд */
gap: 10px;
}
.history-item-actions button {
flex-grow: 1;
margin-left: 0;
}
#singleResultContainer h2, #comparisonOverallTitle {
margin-left: 0; /* На маленьких экранах заголовок занимает всю ширину */
text-align: center; /* Центрируем заголовок */
margin-top: 45px; /* Добавляем отступ сверху из-за кнопки Назад в потоке */
}
#comparisonOverallTitle {
margin-top: 45px; /* И для заголовка сравнения тоже */
}
.history-section h2 {
margin-top: 15px; /* Уменьшаем отступ, кнопки теперь в потоке */
font-size: 20px;
}
}
/* Для корректной работы back кнопки с clear-history */
/* Убрал, т.к. кнопки теперь позиционируются абсолютно или статично в зависимости от размера экрана */
/* .history-section::after {
content: "";
display: table;
clear: both;
} */