/
bytevalue
/
optimal
Обзор
Документация
Войти
/
bytevalue
/
optimal
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/main/resources/static/css/structured.css
1 447 строк
30 KB
Ivan Srdbt
Bugfixes
13 дек 2025, 11:37
13 дек 2025, 11:37
1fa7f8f
Код
Авторство
О чём код?
/* ===== ПРОФЕССИОНАЛЬНАЯ СИСТЕМА ВИЗУАЛИЗАЦИИ ДАННЫХ ===== */ /* Переменные */ :root { /* Цвета графиков */ --chart-primary: #3b82f6; --chart-secondary: #8b5cf6; --chart-accent: #06b6d4; --chart-success: #10b981; --chart-warning: #f59e0b; --chart-danger: #ef4444; --chart-gray: #64748b; --chart-pink: #ec4899; --chart-predicted: #ef4444; /* Градиенты */ --gradient-bar: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); --gradient-bar-hover: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); --gradient-line: linear-gradient(90deg, #8b5cf6 0%, #3b82f6 100%); /* Тени */ --tooltip-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 5px 15px rgba(0, 0, 0, 0.2), 0 2px 5px rgba(0, 0, 0, 0.1); } /* ===== ОСНОВНЫЕ СТИЛИ ===== */ .structured-response { display: flex; flex-direction: column; gap: 32px; } .chart-container { background: rgba(25, 28, 40, 0.95); border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.1); padding: 24px; backdrop-filter: blur(20px); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); } .chart-description { font-size: 14px; color: rgba(255, 255, 255, 0.9); margin-bottom: 20px; line-height: 1.5; padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); } /* ===== СТОЛБЧАТАЯ ДИАГРАММА ===== */ .bar-chart-wrapper { width: 100%; height: 360px; position: relative; overflow: hidden; } .bar-chart-svg { width: 100%; height: 100%; font-family: 'Inter', sans-serif; overflow: visible; } /* Оси */ .chart-axis { stroke: rgba(255, 255, 255, 0.15); stroke-width: 1.5; stroke-linecap: round; } .grid-line { stroke: rgba(255, 255, 255, 0.05); stroke-width: 1; stroke-dasharray: 3, 3; } .tick-text { font-size: 11px; fill: rgba(255, 255, 255, 0.6); font-weight: 500; text-anchor: middle; font-family: 'Inter', sans-serif; } .axis-label { font-size: 12px; fill: rgba(255, 255, 255, 0.8); font-weight: 600; text-anchor: middle; text-transform: uppercase; letter-spacing: 0.5px; } /* Столбцы */ .chart-bar { fill: var(--chart-primary); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; opacity: 0.9; } .chart-bar:hover { fill: var(--chart-secondary); opacity: 1; filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.3)); } .bar-value { font-size: 11px; fill: white; font-weight: 600; text-anchor: middle; pointer-events: none; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); font-family: 'Inter', sans-serif; opacity: 0.9; transition: opacity 0.2s ease; } /* Подписи категорий - ГОРИЗОНТАЛЬНЫЕ */ .category-label { font-size: 12px; fill: rgba(255, 255, 255, 0.7); text-anchor: middle; font-weight: 500; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; transition: all 0.2s ease; } /* Подписи категорий - ВЕРТИКАЛЬНЫЕ (повернутые на 90 градусов) */ .category-label-vertical { font-size: 11px; fill: rgba(255, 255, 255, 0.7); text-anchor: start; font-weight: 500; pointer-events: none; white-space: nowrap; overflow: visible; } .category-label.small { font-size: 10px; } .category-label.hidden { display: none; } /* Автоматическое скрытие значений над столбцами */ .bar-value.hidden { display: none; } .bar-value.compact { font-size: 9px; } /* ===== КРУГОВАЯ ДИАГРАММА ===== */ .pie-chart-wrapper { width: 100%; height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; } .pie-chart-svg { width: 240px; height: 240px; } .pie-slice { stroke: rgba(255, 255, 255, 0.1); stroke-width: 2; cursor: pointer; transition: all 0.3s ease; transform-origin: center; } .pie-slice:hover { stroke: rgba(255, 255, 255, 0.2); stroke-width: 3; filter: brightness(1.1) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2)); } .pie-center { fill: rgba(25, 28, 40, 1); } .pie-value { font-size: 10px; fill: white; font-weight: 600; text-anchor: middle; pointer-events: none; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); font-family: 'Inter', sans-serif; } /* Легенда для круговой диаграммы */ .pie-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 600px; margin-top: 16px; } .pie-legend-item { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: rgba(255, 255, 255, 0.05); border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.08); min-width: 120px; flex: 0 1 auto; } .pie-legend-color { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; } .pie-legend-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .pie-legend-label { font-size: 13px; color: rgba(255, 255, 255, 0.9); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; } .pie-legend-value { font-size: 11px; color: rgba(255, 255, 255, 0.6); font-weight: 500; font-family: 'JetBrains Mono', monospace; } /* ===== ЛИНЕЙНЫЙ ГРАФИК ===== */ .line-chart-wrapper { width: 100%; height: 360px; position: relative; } .line-chart-svg { width: 100%; height: 100%; font-family: 'Inter', sans-serif; overflow: visible; } /* Основные линии (реальные данные) */ .line-path { fill: none; stroke: var(--chart-primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; } /* Линии предсказанных данных */ .line-path-predicted { fill: none; stroke: var(--chart-predicted); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 5, 5; /* Пунктирная линия */ } /* Точки реальных данных */ .line-point { fill: white; stroke: var(--chart-primary); stroke-width: 2; cursor: pointer; transition: all 0.3s ease; r: 4; } .line-point:hover { r: 6; stroke-width: 3; fill: var(--chart-primary); filter: drop-shadow(0 2px 6px rgba(59, 130, 246, 0.3)); } /* Точки предсказанных данных */ .line-point-predicted { fill: var(--chart-predicted); stroke: white; stroke-width: 2; cursor: pointer; transition: all 0.3s ease; r: 4; } .line-point-predicted:hover { r: 6; stroke-width: 3; filter: drop-shadow(0 2px 6px rgba(239, 68, 68, 0.3)); } .area-path { fill: rgba(59, 130, 246, 0.1); stroke: none; } .area-path-predicted { fill: rgba(239, 68, 68, 0.05); stroke: none; } /* ===== ПРОФЕССИОНАЛЬНЫЕ ТУЛТИПЫ ===== */ .chart-tooltip { position: fixed; background: rgba(30, 33, 46, 0.95); backdrop-filter: blur(10px); border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.15); padding: 16px; z-index: 10000; pointer-events: none; box-shadow: var(--tooltip-shadow); min-width: 180px; max-width: 260px; opacity: 0; transform: translate(-50%, -20px); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); font-family: 'Inter', sans-serif; border-left: 3px solid var(--chart-primary); } .chart-tooltip.visible { opacity: 1; transform: translate(-50%, -100%); margin-top: -15px; } .chart-tooltip.predicted { border-left-color: var(--chart-predicted); } .tooltip-content { display: flex; flex-direction: column; gap: 12px; } .tooltip-row { display: flex; align-items: center; gap: 12px; } .tooltip-color { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; } .tooltip-title { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.95); flex: 1; min-width: 0; } .tooltip-divider { height: 1px; background: rgba(255, 255, 255, 0.1); margin: 4px 0; } .tooltip-value { font-size: 24px; font-weight: 700; color: var(--chart-primary); font-family: 'JetBrains Mono', monospace; line-height: 1.2; } .tooltip-value.predicted { color: var(--chart-predicted); } .tooltip-percentage { font-size: 12px; color: rgba(255, 255, 255, 0.7); font-weight: 500; background: rgba(255, 255, 255, 0.08); padding: 4px 8px; border-radius: 6px; align-self: flex-start; } .tooltip-unit { font-size: 11px; color: rgba(255, 255, 255, 0.6); font-weight: 500; margin-left: 4px; } .tooltip-predicted-note { font-size: 11px; color: var(--chart-predicted); font-weight: 500; background: rgba(239, 68, 68, 0.1); padding: 6px 10px; border-radius: 6px; border-left: 2px solid var(--chart-predicted); margin-top: 4px; } /* ===== СТИЛИ СОРТИРОВКИ ТАБЛИЦ ===== */ /* Заголовки таблиц с кнопками сортировки */ .sortable-table th { position: relative; user-select: none; cursor: pointer; transition: background-color 0.2s ease; } .sortable-table th:hover { background-color: rgba(255, 255, 255, 0.08); } .sortable-table th .header-container { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; } .sortable-table th .header-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* Кнопка сортировки */ .sort-button { background: transparent; border: none; padding: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: all 0.2s ease; min-width: 24px; min-height: 24px; flex-shrink: 0; } .sort-button:hover { background-color: rgba(255, 255, 255, 0.1); transform: scale(1.1); } .sort-button:focus { outline: 2px solid var(--chart-primary); outline-offset: 2px; } .sort-button:active { transform: scale(0.95); } .sort-button .sort-icon { font-size: 16px; line-height: 1; color: rgba(255, 255, 255, 0.4); transition: color 0.2s ease, transform 0.2s ease; font-weight: 600; } .sort-button:hover .sort-icon { color: rgba(255, 255, 255, 0.8); } .sort-button.sorted .sort-icon { color: var(--chart-primary); } /* Анимация строк при сортировке */ @keyframes rowAppear { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .sortable-table tbody tr { animation: rowAppear 0.3s ease both; } /* Индикатор активного столбца */ .sortable-table th.active { background: linear-gradient(180deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%); border-left: 2px solid var(--chart-primary); border-right: 2px solid var(--chart-primary); } /* Подсказка о типе сортировки */ .sortable-table th::after { content: attr(title); position: absolute; background: rgba(30, 33, 46, 0.95); color: rgba(255, 255, 255, 0.9); padding: 6px 10px; border-radius: 6px; font-size: 12px; white-space: nowrap; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s ease; z-index: 100; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); pointer-events: none; } .sortable-table th:hover::after { opacity: 1; visibility: visible; } /* ===== БАЗОВЫЕ СТИЛИ ТАБЛИЦ ===== */ .chart-container table { width: 100%; border-collapse: collapse; margin: 20px 0; overflow: hidden; border-radius: 8px; } .chart-container th { background: rgba(255, 255, 255, 0.05); padding: 12px 16px; text-align: left; font-weight: 600; color: rgba(255, 255, 255, 0.9); border-bottom: 1px solid rgba(255, 255, 255, 0.1); position: sticky; top: 0; z-index: 10; } .chart-container td { padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); color: rgba(255, 255, 255, 0.8); transition: background-color 0.2s ease; } .chart-container tbody tr { transition: all 0.2s ease; } .chart-container tbody tr:hover { background: rgba(255, 255, 255, 0.02); } .chart-container tbody tr:hover td { background: rgba(255, 255, 255, 0.02); color: rgba(255, 255, 255, 0.95); } /* Числовые столбцы выравниваем по правому краю */ .chart-container td:has(+ td:last-child), .chart-container td.numeric { text-align: right; font-family: 'JetBrains Mono', monospace; font-size: 13px; } /* ===== АДАПТИВНОСТЬ ===== */ /* Десктопы */ @media (min-width: 1024px) { .bar-chart-wrapper, .line-chart-wrapper { height: 400px; } .pie-chart-wrapper { height: 400px; flex-direction: row; justify-content: space-around; } .pie-chart-svg { width: 280px; height: 280px; } .pie-legend { flex-direction: column; max-width: 300px; } /* Для таблиц на десктопах */ .chart-container table { font-size: 14px; } .sort-button .sort-icon { font-size: 18px; } } /* Планшеты */ @media (max-width: 1023px) and (min-width: 768px) { .chart-container { padding: 20px; } .bar-chart-wrapper, .line-chart-wrapper { height: 320px; } .pie-chart-wrapper { height: 320px; } .pie-chart-svg { width: 200px; height: 200px; } /* Для таблиц на планшетах */ .chart-container table { font-size: 13px; } .chart-container th, .chart-container td { padding: 10px 14px; } .sort-button { min-width: 20px; min-height: 20px; } .sort-button .sort-icon { font-size: 14px; } } /* Мобильные устройства */ @media (max-width: 767px) { .chart-container { padding: 16px; } .bar-chart-wrapper, .line-chart-wrapper, .pie-chart-wrapper { height: 280px; } .pie-chart-svg { width: 180px; height: 180px; } .pie-legend { gap: 8px; } .pie-legend-item { min-width: 100px; padding: 6px 12px; } .pie-legend-label { font-size: 12px; max-width: 80px; } .chart-tooltip { min-width: 160px; padding: 12px; font-size: 13px; } .tooltip-value { font-size: 20px; } .category-label { font-size: 10px; } .category-label-vertical { font-size: 9px; } .tick-text { font-size: 9px; } /* Для таблиц на мобильных */ .chart-container table { font-size: 12px; display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; } .chart-container th, .chart-container td { padding: 8px 12px; min-width: 80px; } .sort-button { min-width: 18px; min-height: 18px; padding: 2px; } .sort-button .sort-icon { font-size: 12px; } .sortable-table th .header-container { gap: 4px; } } /* Очень маленькие экраны */ @media (max-width: 480px) { .bar-chart-wrapper, .line-chart-wrapper, .pie-chart-wrapper { height: 240px; } .pie-chart-svg { width: 160px; height: 160px; } .pie-legend { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 8px; } .pie-legend-item { flex: 0 0 auto; } .category-label { font-size: 9px; } .category-label-vertical { font-size: 8px; } /* Для очень маленьких экранов */ .chart-container th, .chart-container td { padding: 6px 8px; font-size: 11px; } .sort-button { min-width: 16px; min-height: 16px; } .sort-button .sort-icon { font-size: 10px; } } /* ===== УТИЛИТЫ ===== */ /* Редукция движения */ @media (prefers-reduced-motion: reduce) { .chart-container, .chart-bar, .pie-slice, .line-path, .line-path-predicted, .chart-tooltip, .sortable-table tbody tr, .sort-button { animation: none !important; transition: none !important; } } /* Ховер эффекты только для устройств с мышью */ @media (hover: hover) and (pointer: fine) { .chart-bar:hover, .pie-slice:hover, .line-point:hover, .line-point-predicted:hover { transform: translateY(-2px); } .sortable-table th:hover .header-title { text-shadow: 0 0 8px rgba(255, 255, 255, 0.3); } } /* Высокий контраст */ @media (prefers-contrast: high) { .sortable-table th.active { border-left: 3px solid #00ff00; border-right: 3px solid #00ff00; } .sort-button.sorted .sort-icon { color: #00ff00; text-shadow: 0 0 4px #00ff00; } .line-path-predicted { stroke: #ff0000; } .line-point-predicted { stroke: #ffffff; fill: #ff0000; } } .time-series-grid { stroke: rgba(0, 0, 0, 0.1); stroke-width: 1; stroke-dasharray: 4, 4; } .tick-text.time-tick { font-size: 11px; fill: #666; font-weight: 500; } /* Адаптивные подписи для дат */ .axis-label.date-label { font-size: 13px; font-weight: 600; fill: #333; } /* Улучшенные тултипы для временных рядов */ .chart-tooltip.time-tooltip { min-width: 200px; max-width: 300px; } .tooltip-date { font-size: 14px; font-weight: 600; color: #1f2937; margin-bottom: 4px; } .tooltip-time { font-size: 12px; color: #6b7280; margin-bottom: 8px; } /* Стили для пустых графиков */ .chart-empty { display: flex; align-items: center; justify-content: center; min-height: 200px; background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); border-radius: 12px; border: 2px dashed #cbd5e1; color: #64748b; font-size: 16px; font-weight: 500; text-align: center; padding: 40px 20px; } /* Анимация появления строк таблицы */ @keyframes rowAppear { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } /* Адаптивные подписи для разных размеров экрана */ @media (max-width: 768px) { .tick-text { font-size: 10px; } .axis-label { font-size: 12px; } .category-label, .category-label-vertical { font-size: 11px; } } /* Поддержка темной темы */ @media (prefers-color-scheme: dark) { .time-series-grid { stroke: rgba(255, 255, 255, 0.15); } .tick-text.time-tick { fill: #aaa; } .axis-label.date-label { fill: #ddd; } .chart-empty { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); border-color: #475569; color: #94a3b8; } } /* Анимация для появления предсказанной точки */ @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } /* ============================================ СТИЛИ ДЛЯ КАРТ РАЙОНОВ ============================================ */ /* Контейнер карты */ .district-map-container { position: relative; margin: 2.5rem auto; max-width: 100%; overflow: hidden; border-radius: 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.1); background: var(--card-bg); border: 1px solid var(--border-color); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); } .district-map-container:hover { box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15), 0 8px 20px rgba(0, 0, 0, 0.08); transform: translateY(-2px); } /* Обертка SVG */ .district-svg-wrapper { position: relative; width: 100%; padding-bottom: 80%; /* Сохраняем пропорции 1000:800 (5:4) */ background: linear-gradient(135deg, rgba(30, 58, 138, 0.03), rgba(59, 130, 246, 0.05)); border-radius: 16px; overflow: hidden; } /* SVG элемент */ .district-svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; transition: transform 0.3s ease; } /* Фоновая карта */ .district-map-background { filter: brightness(1.02) contrast(1.05) saturate(1.1); mix-blend-mode: multiply; } /* Районы */ .district-path { transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); vector-effect: non-scaling-stroke; stroke: #1e3a8a !important; stroke-opacity: 0.7 !important; stroke-linejoin: round; stroke-linecap: round; transform-origin: center; } /* Эффект при наведении на район */ .district-path:hover { stroke-width: 2.5 !important; stroke-opacity: 0.9 !important; transform: translateZ(0); animation: district-pulse 2s infinite; } @keyframes district-pulse { 0%, 100% { stroke-width: 2.5; } 50% { stroke-width: 3; } } /* Группа районов */ .districts-group { filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)); } /* Информация о цветовой шкале */ .color-scale-info { margin: 1.5rem 0 2rem; padding: 1.5rem; background: linear-gradient(135deg, var(--card-bg), rgba(30, 58, 138, 0.05)); border-radius: 12px; border: 1px solid rgba(30, 58, 138, 0.15); position: relative; overflow: hidden; } .color-scale-info::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #0d0887, #46039f, #7201a8, #9c179e, #bd3786, #d8576b, #ed7953, #fb9f3a, #fdca26, #f0f921); } .color-scale-gradient { height: 24px; border-radius: 8px; margin-bottom: 1rem; background: linear-gradient(90deg, #0d0887, #46039f, #7201a8, #9c179e, #bd3786, #d8576b, #ed7953, #fb9f3a, #fdca26, #f0f921); border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2); } .color-scale-labels { display: flex; justify-content: space-between; margin-bottom: 0.75rem; font-size: 0.95rem; font-weight: 500; } .color-label { position: relative; padding: 0.25rem 0.75rem; background: rgba(255, 255, 255, 0.9); border-radius: 6px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); transition: all 0.3s ease; } .color-label:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); } .color-label.min { color: #0d0887; border-left: 4px solid #0d0887; } .color-label.mid { color: #bd3786; border-left: 4px solid #bd3786; } .color-label.max { color: #f0f921; border-left: 4px solid #f0f921; } .color-scale-unit { text-align: center; font-size: 0.9rem; color: var(--text-secondary); font-style: italic; padding: 0.75rem; background: rgba(255, 255, 255, 0.7); border-radius: 6px; border: 1px dashed rgba(30, 58, 138, 0.3); } /* Легенда */ .district-legend { margin-top: 2rem; padding: 1.75rem; background: linear-gradient(135deg, var(--card-bg), rgba(255, 255, 255, 0.05)); border-radius: 14px; border: 1px solid var(--border-color); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); position: relative; } .district-legend::before { content: ''; position: absolute; top: -1px; left: -1px; right: -1px; bottom: -1px; background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(30, 58, 138, 0.05)); border-radius: 15px; z-index: -1; } .legend-title { font-weight: 700; margin-bottom: 1.25rem; color: var(--text-primary); font-size: 1.2rem; display: flex; align-items: center; gap: 0.75rem; } .legend-gradient-bar { height: 28px; border-radius: 10px; margin-bottom: 1rem; background: linear-gradient(90deg, #0d0887, #46039f, #7201a8, #9c179e, #bd3786, #d8576b, #ed7953, #fb9f3a, #fdca26, #f0f921); border: 2px solid rgba(255, 255, 255, 0.3); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.1); position: relative; overflow: hidden; } .legend-gradient-bar::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%); animation: shine 3s infinite; } @keyframes shine { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } } .legend-labels { display: flex; justify-content: space-between; margin-bottom: 1.5rem; font-size: 0.95rem; color: var(--text-secondary); } .legend-label { position: relative; padding-top: 1.5rem; font-weight: 500; } .legend-label::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 2px; height: 12px; background: rgba(30, 58, 138, 0.5); } .legend-label.min-label { color: #0d0887; } .legend-label.mid-label { color: #bd3786; } .legend-label.max-label { color: #f0f921; } .legend-unit { font-size: 0.95rem; color: var(--text-secondary); padding: 0.75rem; text-align: center; background: rgba(59, 130, 246, 0.1); border-radius: 8px; border: 1px solid rgba(59, 130, 246, 0.2); } /* Стили для тултипа */ .chart-tooltip.district-tooltip { min-width: 200px; max-width: 280px; border-radius: 12px; border: 2px solid rgba(30, 58, 138, 0.2); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); animation: tooltip-appear 0.3s cubic-bezier(0.4, 0, 0.2, 1); transform-origin: bottom center; } @keyframes tooltip-appear { 0% { opacity: 0; transform: translateY(10px) scale(0.95); } 100% { opacity: 1; transform: translateY(0) scale(1); } } .tooltip-content.district-tooltip { padding: 1.25rem; } .tooltip-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; } .tooltip-color { width: 20px; height: 20px; border-radius: 6px; border: 2px solid rgba(255, 255, 255, 0.8); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); } .tooltip-title { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); } .tooltip-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(30, 58, 138, 0.5), transparent); margin: 0.75rem 0; } .tooltip-value { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); text-align: center; padding: 0.5rem; background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(30, 58, 138, 0.05)); border-radius: 8px; border: 1px solid rgba(30, 58, 138, 0.2); } .tooltip-unit { font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); margin-left: 0.5rem; opacity: 0.8; } /* Анимация появления карты */ .district-map-container { animation: map-appear 0.6s cubic-bezier(0.4, 0, 0.2, 1); } @keyframes map-appear { 0% { opacity: 0; transform: translateY(30px) scale(0.98); } 100% { opacity: 1; transform: translateY(0) scale(1); } } /* Адаптивность */ @media (max-width: 768px) { .district-svg-wrapper { padding-bottom: 90%; /* Немного увеличиваем высоту на мобильных */ } .district-map-container { margin: 1.5rem auto; border-radius: 12px; } .color-scale-info { margin: 1rem 0 1.5rem; padding: 1.25rem; } .color-scale-labels { flex-direction: column; gap: 0.5rem; align-items: center; } .color-label { width: 100%; text-align: center; } .district-legend { padding: 1.25rem; margin-top: 1.5rem; } .legend-labels { flex-direction: column; gap: 0.75rem; align-items: center; } .legend-label { padding-top: 0; padding-left: 1.5rem; } .legend-label::before { left: 0; top: 50%; transform: translateY(-50%); width: 12px; height: 2px; } } @media (max-width: 480px) { .district-svg-wrapper { padding-bottom: 100%; } .district-map-container { border-radius: 10px; margin: 1rem auto; } .legend-gradient-bar { height: 24px; } .tooltip-value { font-size: 1.25rem; } } /* Эффект для отсутствующих данных */ .district-group.empty .district-path { fill-opacity: 0.2 !important; stroke-opacity: 0.3 !important; stroke-dasharray: 3,3; animation: dash-animation 20s linear infinite; } @keyframes dash-animation { 0% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 100; } } /* Свечение при фокусе (для accessibility) */ .district-path:focus { outline: none; filter: url(#district-glow) drop-shadow(0 0 8px rgba(59, 130, 246, 0.6)); transform: scale(1.02); transition: all 0.3s ease; }