body {
    font-family: Arial, sans-serif;
    background-color: #f0f4f8;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 800px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

header {
    background-color: #0783a9;
    color: white;
    padding: 10px 0;
    border-radius: 8px 8px 0 0;
    text-align: left;
}

main {
    padding: 20px;
    text-align: left;
}

footer {
    margin-top: 20px;
    text-align: center;
}

footer p {
    font-size: 14px;
    color: #555;
}

footer a {
    color: #0783a9;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.welcome, .steps, .support-feedback, .backlog {
    margin-bottom: 20px;
}

.steps h2, .step h3 {
    margin-bottom: 20px;
}

.welcome {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.welcome img {
    width: 200px;
    height: 200px;
    margin-right: 20px;
}

@media (max-width: 768px) {
    .welcome img {
        max-width: 100px;
        max-height: 100px;
        margin-right: 20px; /* Уменьшение изображения в два раза для мобильных устройств */
    }

    .welcome {
        display: flex;
        align-items: top;
        margin-bottom: 20px;
    }
}

.steps h2 {
    display: inline-block;
    margin-right: 10px;
}

.support-feedback {
    margin-bottom: 20px;
}

.support-feedback div {
    margin-bottom: 10px;
}

.donate-btn {
    width: 150px;
    height: 50px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #0783a9;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.donate-btn:hover {
    background-color: #065f7d;
}

.option-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.option {
    display: flex;
    align-items: center;
    width: 100%;
}

.option img {
    width: 100px;
    height: 133px;
    margin-right: 20px;
}

.option-content {
    flex: 1;
}

.option-content h3 {
    margin: 0;
    font-size: 1.2em;
}

.option-content p {
    margin: 5px 0 10px 0;
    font-size: 0.9em;
}

.try-btn {
    background-color: #0783a9;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.try-btn:hover {
    background-color: #065f7d;
}

button:disabled, .inactive-btn {
    background-color: #ccc;
    cursor: not-allowed;
}

a {
    color: #0783a9;
    text-decoration: underline;
    cursor: pointer;
}

a:hover {
    text-decoration: none;
}

.support-feedback p {
    margin-bottom: 20px;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    text-align: left;
    position: relative;
    margin: auto;
}

.close-btn {
    background-color: #0783a9;
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    border-radius: 5px;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn.right {
    right: 10px;
    top: 10px;
}

.file-selection {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.modal-content textarea,
.modal-content input[type="email"] {
    width: calc(100% - 20px);
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.modal-footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    position: relative;
}

.modal-footer .action-btn {
    background-color: #0783a9;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
}

.modal-footer .action-btn:hover {
    background-color: #065f7d;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 2s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.donate-section {
    text-align: center;
    margin: 20px 0;
}

.toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px;
}

.toggle-label {
    margin: 0 10px;
    font-size: 14px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.toggle-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: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #0783a9;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.modal-footer .settings-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    width: 100%;
    background-color: #ccc;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 10px;
}

.progress {
    height: 20px;
    background-color: #0783a9;
    width: 0;
    transition: width 0.4s;
    border-radius: 5px 0 0 5px;
}

#recognizeStatus {
    margin-top: 10px;
    font-size: 14px;
    color: #555;
    display: block; /* Отображается как блок */
    text-align: center; /* Выравнивание текста по центру */
}

/* Специфичный стиль для модального окна с backlog */
.backlog-modal .modal-content {
    width: 80%;
    max-width: 700px;  /* Увеличена ширина только для этого модального окна */
    padding: 18px;
}

/* Обновление для таблицы */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.9em;
    font-family: 'Arial', sans-serif;
    min-width: 400px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

.styled-table thead tr {
    background-color: #0783a9;
    color: #ffffff;
    text-align: center;
}

.styled-table th,
.styled-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #dddddd; /* Добавляем четкие границы ячеек */
}

.styled-table tbody tr {
    border-bottom: 1px solid #dddddd;
    transition: background-color 0.3s;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f9f9f9;
}

.styled-table tbody tr:hover {
    background-color: #f1f1f1;
}

.styled-table tbody tr:last-of-type {
    border-bottom: 2px solid #0783a9;
}

.styled-table tbody tr.active-row {
    font-weight: bold;
    color: #0783a9;
}

.styled-table th {
    text-align: center;
    background-color: #0783a9;
    color: white;
}

.styled-table td {
    word-wrap: break-word;
    max-width: 150px; /* Максимальная ширина для каждой ячейки */
    border: 1px solid #dddddd; /* Границы для всех ячеек */
}

/* Прокрутка таблицы и перенос слов целиком на мобильных устройствах */
@media (max-width: 768px) {
    .backlog-modal .modal-content {
        width: 95%; /* Увеличиваем ширину до 90% для мобильных */
        max-width: 100%; /* Снимаем ограничение по ширине */
        padding: 15px;
    }

    .styled-table {
        display: block; /* Делаем таблицу блочным элементом для мобильных */
        width: 100%; /* Ширина таблицы 100%, чтобы она вписывалась в экран */
        overflow-x: auto; /* Включаем горизонтальную прокрутку */
    }

    .styled-table thead, 
    .styled-table tbody {
        display: table; /* Обновляем стиль для заголовков и данных */
        width: 95%;
    }

    .styled-table th,
    .styled-table td {
        text-align: left; /* Выровняем текст для мобильных по левому краю */
        white-space: normal; /* Разрешаем перенос текста */
        word-wrap: normal; /* Отключаем перенос части слов */
        word-break: keep-all; /* Переносим слова целиком */
        overflow-wrap: break-word; /* Переносим длинные слова целиком на новую строку */
    }
    
    .styled-table td {
        max-width: 95%; /* Убираем ограничение ширины для мобильных устройств */
    }
    
    .styled-table thead tr, .styled-table tbody tr {
        display: table-row; /* Убедимся, что строки правильно отображаются */
    }
}
