body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
}

.description {
    position: relative;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e1e4e8;
    text-align: center;
}

.logo-top-right {
    position: absolute;
    top: 10px;
    right: 10px;
    height: 40px;
    width: auto;
}

.main-title {
    font-size: 32px;
    margin-bottom: 15px;
}

.upload-section {
    margin-bottom: 30px;
}

/* ===== ЕДИНЫЕ РАЗМЕРЫ ДЛЯ ВСЕХ КНОПОК ===== */
button {
    min-width: 200px;
    height: 40px;
    padding: 0 15px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* Стили кнопок по цветам */
.upload-btn,
.btn-green {
    background-color: #28a745;
    color: white;
    border: none;
    transition: background-color 0.3s;
}

.upload-btn:hover,
.btn-green:hover {
    background-color: #218838;
}

.btn-gray {
    background-color: #6c757d;
    color: white;
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-blue {
    background-color: #007bff;
    color: white;
    border: none;
}

.btn-blue:hover {
    background-color: #0069d9;
}

#fileInput {
    display: none;
}

.loading-indicator {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    background-color: #e7f5ff;
    border: 1px solid #d0e3ff;
    display: none;
}

/* Контейнер кнопок */
.button-container {
    display: flex;
    width: 100%;
    margin-top: 15px;
}

.show-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

/* Группа кнопок теста */
.test-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Селект в одном стиле с кнопками */
#questionCount {
    width: 200px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

#questionCount:focus {
    border-color: #4a90e2;
}

.file-name {
    margin-left: 10px;
    font-style: italic;
    color: #666;
}

.theory-output {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.correct {
    background-color: #c7f7d2;
    font-weight: bold;
}

.correct-answer {
    background-color: #c7f7d2;
    font-weight: bold;
}


.incorrect {
    background-color: #fdd;
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */
@media (max-width: 600px) {
    /* Кнопки загрузки и скачивания */
    .upload-section {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    #downloadSection {
        margin-left: 0 !important;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    /* Все кнопки на мобильных */
    button {
        width: 100%;
        min-width: unset; /* убираем фиксированную минимальную ширину */
    }

    /* Селект тоже на всю ширину */
    #questionCount {
        width: 100%;
    }

    /* Кнопки в тестах вертикально */
    .test-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
