body {
  font-family: Arial, sans-serif;
  margin: 20px;
  background-color: #f9f9f9;
  color: #333;
}

h1, h2, h3 {
  color: #2c3e50;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

/* Стили для блока с кнопками */
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.custom-file-upload {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  background-color: #3498db;
  color: #fff;
  border: none;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.custom-file-upload:hover {
  background-color: #2980b9;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  background-color: #3498db;
  color: #fff;
  border: none;
  border-radius: 4px;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #2980b9;
}

/* Стили для чекбоксов */
.method-toggles-container {
  margin-bottom: 20px;
}

.method-toggles-container h3 {
  margin-bottom: 10px;
}

#methodToggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#methodToggles label {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  background-color: #f1f1f1;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#methodToggles label:hover {
  background-color: #e1e1e1;
}

#methodToggles input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

.method-weight {
  font-size: 0.78em;
  color: #888;
  font-style: italic;
}

/* Стили для ползунка и значения порога */
.threshold-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.threshold-control label {
  font-weight: bold;
}

.threshold-control input[type="range"] {
  flex: 1;
}

.threshold-control input[type="number"] {
  width: 60px;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Стили для таблицы */
.table-container {
  width: 100%;
  overflow-x: auto;
  margin-top: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

table, th, td {
  border: 1px solid #ddd;
}

th, td {
  padding: 12px;
  text-align: left;
}

th {
  background-color: #2c3e50;
  color: #fff;
}

/* Затемненный фон для последней строки */
tr:last-child {
  background-color: #f5f5f5; /* Слегка затемненный фон */
}

/* Затемненный фон для ячеек колонок "Качество изображения" и "Результат" */
td:nth-last-child(2),
td:last-child {
  background-color: #f5f5f5; /* Слегка затемненный фон */
}

/* Цвета для текста */
.red {
  color: #e74c3c;
}

.green {
  color: #27ae60;
}

/* Лоадер */
.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
  display: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Стили для изображений */
.image-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.image-item {
  width: 30%;
  text-align: center;
}

.image-item img {
  max-width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

/* Описание программы */
.description {
  margin-top: 40px;
  line-height: 1.6;
}

.description h2 {
  margin-bottom: 20px;
}

.description h3 {
  margin-top: 20px;
  color: #2c3e50;
}

.description ul {
  list-style-type: disc;
  margin-left: 20px;
}

/* Стили для JavaScript-кода */
.code pre {
	max-width: 90%;
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    color: #abb2bf; /* Светлый текст */
    background-color: #282c34; /* Темный фон */
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

/* Стили для разделения методов */
ul li {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.documentation ul li:last-child {
    border-bottom: none;
}
