/* Общие стили */
body {
  font-family: "Arial Black", Arial, sans-serif;
  background-color: #1a1a1a;
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: #fff;
}

/* Основной контейнер */
.main-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  max-width: 1200px;
  width: 100%;
  flex-wrap: wrap;
}

/* Контейнер теории */
.theory-container {
  background: #2c2c2c;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(255, 0, 0, 0.3);
  padding: 20px;
  text-align: center;
  flex: 1;
  min-width: 300px;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Заголовки */
h1 {
  font-size: 30px;
  color: #e63946;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(255, 0, 0, 0.5);
}

h2 {
  font-size: 1.8em;
  color: #fff;
  margin: 20px 0 10px;
}

h3 {
  font-size: 1.4em;
  color: #ddd;
  margin: 15px 0 10px;
}

/* Контейнер для контента теории */
#theory-content {
  text-align: left;
  max-width: 100%;
  padding: 20px;
}

/* Стили для текста и списков */
p {
  font-size: 1em;
  line-height: 1.6;
  color: #fff;
  margin: 10px 0;
}

ul, ol {
  margin: 10px 0;
  padding-left: 25px;
}

ul li, ol li {
  font-size: 1em;
  color: #fff;
  margin-bottom: 8px;
}

/* Стили для контейнера изображения таблицы */
.trig-table-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  padding: 10px;
}

.trig-table-img {
  max-width: 100%;
  height: auto;
  border: 1px solid #555;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(255, 0, 0, 0.2);
}

/* Стили для контейнера задач */
.task-container {
  background: #2c2c2c;
  border: 1px solid #555;
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  box-shadow: 0 2px 5px rgba(255, 0, 0, 0.2);
}

.task-container p {
  margin: 10px 0;
  line-height: 1.6;
}

.task-container ol {
  margin: 10px 0;
  padding-left: 25px;
}

.task-container ol li {
  margin-bottom: 8px;
  font-size: 1em;
}

/* Стили для контейнера ввода */
.input-container {
  display: flex;
  gap: 10px;
  margin: 15px 0;
  align-items: flex-start;
}

.input-container textarea {
  padding: 8px;
  font-size: 1em;
  border: 1px solid #555;
  border-radius: 5px;
  width: 300px;
  background-color: #333;
  color: #fff;
  resize: vertical;
}

.input-container textarea:disabled {
  background-color: #444;
  cursor: not-allowed;
}

.check-btn {
  padding: 8px 15px;
  font-size: 1em;
  border: none;
  border-radius: 5px;
  background-color: #e63946;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.check-btn:hover {
  background-color: #9d0208;
  transform: scale(1.05);
}

.check-btn:disabled {
  background-color: #444;
  cursor: not-allowed;
}

/* Стили для сообщений об ошибках */
.error-message {
  font-size: 0.9em;
  margin: 10px 0;
}

/* Стили для решения */
.solution {
  display: none;
  margin-top: 15px;
}

/* Стили для контейнера чекбокса (для страницы теории) */
.read-checkbox-container {
  display: none;
  text-align: center;
  margin: 20px 0;
}

.read-checkbox-label {
  font-size: 1em;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.read-checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* Стили для контейнера кнопок */
.back-button-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

/* Стили для кнопок */
#backBtn, #tasksBtn {
  background-color: #e63946;
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.2s;
  white-space: nowrap;
}

#backBtn:hover, #tasksBtn:hover {
  background-color: #9d0208;
  transform: scale(1.05);
}

/* Адаптивность */
@media (max-width: 768px) {
  .main-layout {
    flex-direction: column;
    align-items: center;
  }

  .theory-container {
    max-width: 100%;
  }

  .input-container {
    flex-direction: column;
    align-items: stretch;
  }

  .input-container textarea {
    width: 100%;
  }

  .check-btn {
    padding: 10px;
  }
}

@media screen and (max-width: 600px) {
  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 1.5em;
  }

  h3 {
    font-size: 1.2em;
  }

  p, ul li, ol li {
    font-size: 0.9em;
  }

  .trig-table-img {
    max-width: 90%;
  }

  .task-container {
    padding: 10px;
  }

  .task-container ol li {
    font-size: 0.9em;
  }

  .input-container textarea {
    width: 100%;
  }

  .check-btn {
    padding: 10px;
  }

  .read-checkbox-container {
    margin: 15px 0;
  }

  .read-checkbox-label {
    font-size: 0.9em;
  }

  .read-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
  }

  .back-button-container {
    flex-direction: column;
    gap: 10px;
  }

  #backBtn, #tasksBtn {
    width: 100%;
    padding: 12px;
    font-size: 1em;
  }
}