body {
    font-family: sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

h1 {
    color: #333;
}

input[type="file"] {
    margin-bottom: 15px;
}

button {
    padding: 10px 20px;
    background-color: #5cb85c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #4cae4c;
}

#output {
    margin-top: 20px;
    text-align: center;
}

#output a {
    display: inline-block;
    margin: 10px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

#output a:hover {
    background-color: #0056b3;
}

#progressBarContainer {
    width: 100%;
    background-color: #ddd;
    border-radius: 5px;
    margin-top: 15px;
    display: none; /* Приховати спочатку */
    position: relative; /* Для позиціонування progressText абсолютно */
    cursor: default; /* За замовчуванням курсор */
    overflow: hidden; /* Щоб дочірні елементи не виходили за межі */
}

#progressBarContainer.active {
    background-color: #007bff; /* Колір фону кнопки */
    cursor: pointer; /* Змінюємо курсор на pointer */
}

#progressBarContainer.active #progressBar {
    background-color: #0056b3; /* Трохи темніший колір для прогрес бару всередині активної кнопки */
}

#progressBar {
    width: 0%;
    height: 40px; /* Збільшуємо висоту для кращого вигляду кнопки */
    background-color: #5cb85c;
    border-radius: 5px;
    text-align: center;
    line-height: 40px; /* Вертикальне центрування тексту */
    color: white;
    transition: width 0.3s ease; /* Додаємо анімацію для ширини */
}

#progressText {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: black; /* За замовчуванням чорний колір тексту прогресу */
    font-size: 1em;
    transition: color 0.3s ease; /* Анімація для зміни кольору тексту */
}

#progressBarContainer.active #progressText {
    color: white; /* Білий колір тексту в активній кнопці */
}

#progressBarContainer.active #progressText::after {
    content: "Завантажити ZIP"; /* Текст для кнопки завантаження */
}

#progressBarContainer.active #progressText {
    color: transparent; /* Робимо текст відсотка прозорим в активній кнопці */
}

#progressBarContainer.active #progressText::after {
    color: white; /* Білий колір тексту "Завантажити ZIP" */
    text-shadow: none; /* Переконаємося, що немає тіні тексту */
    font-weight: bold; /* Робимо текст жирним для кращої видимості */
    text-align: center;
    display: block;
    position: static; /* Повертаємо до статичного позиціонування для тексту кнопки */
    transform: none; /* Забираємо transform */
    left: auto;
    top: auto;
}