/
a_silinenko
/
project1
Обзор
Документация
Войти
/
a_silinenko
/
project1
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
style.css
260 строк
6 KB
a_silinenko
Отлажен UX
26 май 2026, 16:24
26 май 2026, 16:24
d1727a6
Код
Авторство
О чём код?
/* Общее сброс стилей и центрирование */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f5f7fa; color: #333; line-height: 1.6; min-height: 100vh; display: flex; justify-content: center; align-items: flex-start; padding: 40px 20px; } /* Центрированный контейнер */ .container { width: 100%; max-width: 700px; background-color: white; padding: 30px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); text-align: center; } h1 { font-size: 24px; color: #007bff; margin-bottom: 24px; } /* Секция загрузки файла */ .upload-section { margin-bottom: 20px; text-align: left; } .file-upload-label { display: flex; align-items: center; gap: 10px; padding: 12px; border: 2px dashed #007bff; border-radius: 8px; background-color: #f8f9fa; font-size: 14px; color: #333; cursor: pointer; transition: all 0.3s ease; width: 100%; } .file-upload-label:hover { border-color: #0056b3; background-color: #e9ecef; } /* Скрытие настоящего input */ .file-upload-label input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0, 0, 0, 0); pointer-events: none; } /* Визуальная кнопка */ .file-upload-label::after { content: "Выберите файл"; display: inline-block; padding: 6px 12px; background-color: #007bff; color: white; font-size: 14px; font-weight: bold; border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); } .file-upload-label:hover::after { background-color: #0056b3; } /* Отображение имени файла */ .file-name { font-style: italic; color: #555; font-size: 14px; margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; } /* Сообщения об ошибках */ .error { color: #dc3545; font-size: 14px; margin-top: 8px; text-align: left; } /* Область вывода текста */ .content-area { text-align: left; font-size: 14px; line-height: 1.6; background-color: #f8f9fa; border: 1px solid #ddd; border-radius: 6px; max-height: 600px; overflow-y: auto; word-break: break-word; margin-top: 12px; display: none; /* Скрываем по умолчанию */ } /* Показываем, когда есть контент */ .content-area.has-content { display: block; } /* Внутренний текст — pre */ .content-area > pre { white-space: pre-wrap; margin: 0; padding: 15px; font-family: sans-serif; font-size: 14px; background-color: inherit; border: none; border-radius: inherit; width: 100%; box-sizing: border-box; } /* Область статуса проверки — теперь как content-area */ .status-area { display: none; margin-top: 8px; /* Уменьшаем отступ сверху */ padding: 15px; background-color: #f8f9fa; border: 1px solid #ddd; /* Серая рамка, как у content-area */ border-radius: 6px; /* Одинаковый радиус */ font-size: 14px; color: #333; text-align: left; line-height: 1.6; } .status-area.active { display: block; } .status-area .loader { display: inline-block; width: 16px; height: 16px; border: 2px solid #ccc; border-top-color: #007bff; border-radius: 50%; animation: spin 1s linear infinite; margin-right: 8px; } @keyframes spin { to { transform: rotate(360deg); } } /* Группа кнопок — в одну строку, одинаковая высота */ .button-group { display: flex; gap: 12px; justify-content: center; margin-bottom: 20px; } .button-group button { /* Фиксированная высота и выравнивание */ height: 40px; padding: 0 20px; font-size: 16px; font-family: inherit; border: none; border-radius: 6px; cursor: pointer; transition: background-color 0.3s ease, transform 0.1s ease; display: flex; align-items: center; justify-content: center; white-space: nowrap; } .button-group button:hover:not(:disabled) { transform: translateY(-1px); } /* Стиль для "Проверить" */ #checkBtn { background-color: #28a745; color: white; } #checkBtn:hover:not(:disabled) { background-color: #218838; } #checkBtn:disabled { background-color: #6c757d; cursor: not-allowed; opacity: 0.7; } /* Стиль для "Очистить" */ #clearBtn { background-color: #6c757d; color: white; } #clearBtn:hover { background-color: #5a6268; } /* Заголовок для области содержимого */ .content-title { font-size: 16px; font-weight: bold; color: #333; text-align: left; margin-top: 20px; display: none; /* Скрываем по умолчанию */ } /* Показываем, когда есть контент */ .content-title.visible { display: block; } /* Стиль для вынесенных заголовков */ .section-title { text-align: left; font-size: 16px; font-weight: bold; color: #333; margin: 20px 0 8px 0; display: none; /* Скрываем по умолчанию */ } /* Показываем, когда нужно */ .section-title.visible { display: block; }