/* === БАЗОВІ СКИДАННЯ СТИЛІВ === */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* === ОСНОВНИЙ СТИЛЬ ТІЛА СТОРІНКИ === */
body {
    font-family: Arial, sans-serif;
    background-color: #e0f7fa;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    animation: fadeInBody 0s ease-in;
}

/* === КНОПКИ ТА ПОСИЛАННЯ === */
.link-button {
    padding: 14px;
    border: 1px solid #000000;
    border-radius: 30px;
    font-size: 1rem;
    text-align: center;
    transition: all 0.4s ease;
    text-decoration: none;
    display: inline-block;
    outline: none;
    margin: 0;
    width: auto;
    max-width: 200px;
    white-space: nowrap;
    background: linear-gradient(45deg, #4CAF50, #2e7d32);
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

    .link-button:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    }

    .link-button:active {
        transform: scale(0.95);
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    }

/* === МЕНЮ === */
.menu {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    backdrop-filter: blur(5px);
    position: relative;
    z-index: 1;
}

/* === ВІДСТУП ДЛЯ КОНТЕНТУ ПІД МЕНЮ === */
.content {
    margin-top: 20px;
}

/* === КНОПКИ У ФОРМАХ (широкі) === */
.form-container .link-button,
.form-container button,
.form-container input[type="submit"],
.upload-form button {
    width: 100%;
}

/* === ФОРМА ВХОДУ === */
.form-container {
    max-width: 350px;
    width: 90%;
    padding: 25px;
    background: linear-gradient(135deg, #f4f4f4, #e0f2f1);
    border-radius: 15px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.3s ease-out;
}

h2 {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.3s ease-out;
}

.form-group {
    margin-bottom: 15px;
}

label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

input[type="text"],
input[type="password"],
input[type="submit"],
button {
    padding: 14px;
    border: 1px solid #000000;
    border-radius: 30px;
    font-size: 1rem;
    text-align: center;
    transition: all 0.4s ease;
    text-decoration: none;
    display: inline-block;
    outline: none;
    margin: 0;
    width: 100%;
}

input[type="submit"],
button {
    background: linear-gradient(45deg, #4CAF50, #2e7d32);
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

    input[type="submit"]:hover,
    button:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    }

    input[type="submit"]:active,
    button:active {
        transform: scale(0.95);
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    }

/* === ПОЛЯ ФОКУСУ === */
input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 5px #4CAF50;
}

/* === ПОМИЛКИ === */
.error-message {
    color: red;
    font-size: 14px;
    text-align: center;
    margin-bottom: 10px;
    animation: fadeInError 0.5s ease-in;
}

/* === ПАРОЛЬ ТА ІКОНКА === */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    user-select: none;
    color: #4CAF50;
    transition: color 0.3s ease;
}

    .password-toggle:hover {
        color: #2e7d32;
    }

/* === КОНТЕЙНЕР САЙТУ === */
.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

    .container ul {
        list-style: none;
        padding: 0;
    }

    .container li {
        margin-bottom: 10px;
    }

    .container a {
        text-decoration: none;
        color: #007bff;
    }

        .container a:hover {
            text-decoration: underline;
        }

/* === СПИСОК ФАЙЛІВ === */
.file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.delete-btn {
    background: linear-gradient(45deg, #f44336, #c62828);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .delete-btn:hover {
        box-shadow: 0 0 8px #f44336;
    }

/* === АДАПТИВНІСТЬ === */
@media (max-width: 500px) {
    .form-container {
        padding: 20px;
    }

    input[type="text"],
    input[type="password"],
    input[type="submit"],
    button,
    .link-button {
        font-size: 0.9rem;
        padding: 12px;
    }

    .password-toggle {
        font-size: 16px;
        right: 10px;
    }

    .menu a.link-button {
        width: auto;
        max-width: 200px;
        text-align: center;
        white-space: nowrap;
        margin: 0;
    }
}
/* ← Ця дужка закриває @media і ТРЕБА! */

/* === АНІМАЦІЇ (мають бути ПОЗА медіа-запитом) === */
@keyframes fadeInBody {
    from {
        opacity: 0;
        background-color: #ffffff;
    }

    to {
        opacity: 1;
        background-color: #e0f7fa;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInError {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}