/* Общие настройки */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

.dark-theme {
    background-color: #121212;
    color: #ffffff;
}

/* Контейнер с сеткой */
.container {
    display: grid;
    grid-template-areas:
        "input fault"
        "output output"
        "verification verification"
        "theme theme";
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 20px; /* Отступ между элементами */
    padding: 20px;
}

/* Раздел ввода текста */
.input-section {
    grid-area: input;
}

textarea {
    width: 100%;
    height: 200px;
    padding: 10px;
    font-size: 14px;
    resize: none;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.dark-theme textarea {
    background-color: #1e1e1e;
    color: #ffffff;
    border-color: #333;
}

/* Раздел описания неисправности */
.fault-description {
    grid-area: fault;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.05);
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-left: 20px; /* Добавляем отступ слева */
}

.dark-theme .fault-description {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: #333;
}

/* Раздел вывода результатов */
.output-section {
    grid-area: output;
    display: flex; /* Выравнивание по центру */
    flex-direction: column; /* Столбцовая разметка для заголовка и контента */
    align-items: center; /* Центрирование по горизонтали */
    justify-content: center; /* Центрирование по вертикали */
    text-align: center; /* Центрирование текста */
}

.output-section h3 {
    margin-top: 0;
    margin-bottom: 10px; /* Отступ между заголовком и результатом */
}

#outputResult {
    width: 100%; /* Занимает всю доступную ширину */
    max-width: 500px; /* Ограничиваем максимальную ширину */
    text-align: left; /* Текст внутри результата выравнивается по левому краю */
}

.result-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.result-item span {
    margin-right: 10px;
}

/* Переключатель темы */
.theme-switcher {
    grid-area: theme;
    position: fixed; /* Фиксированное положение */
    right: 20px; /* Отступ справа */
    bottom: 20px; /* Отступ снизу */
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Кнопки */
button {
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 5px;
    width: auto;
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.dark-theme button {
    background-color: #333;
    color: #ffffff;
    border-color: #555;
}

button:hover {
    background-color: #e9e9e9;
}

.dark-theme button:hover {
    background-color: #444;
}

/* Подсветка скопированных значений */
.copied {
    background-color: green !important;
    color: white !important;
}

/* Важные сообщения */
.attention {
    color: red;
    font-weight: bold;
}

.verification-section {
    grid-area: verification;
    margin-top: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
}

.dark-theme .verification-section {
    background-color: #1e1e1e;
    border-color: #333;
}

#verificationText {
    white-space: pre-wrap; /* Перенос строк */
    word-wrap: break-word;
       font-family: monospace;
}

.highlighted-line {
    background-color: green !important; /* Цвет как у "copied" */
    padding: 2px 5px;
    border-radius: 4px;
}