body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

.container {
    width: 80%;
    max-width: 1200px;
    margin: 50px auto;
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #333;
}

#matchForm {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    box-sizing: border-box;
}

button {
    display: block;
    width: 100%;
    padding: 10px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background: #218838;
}

#result {
    margin-top: 20px;
    padding: 15px;
    background: #e9ecef;
    border-radius: 4px;
    display: none;
}

#result.success {
    background: #d4edda;
    color: #155724;
}

#result.error {
    background: #f8d7da;
    color: #721c24;
}

#loadingOverlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    border: 8px solid #f3f3f3; /* Light grey */
    border-top: 8px solid #28a745; /* Green */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Медиа-запрос для экранов шириной 768px и выше */
@media (min-width: 768px) {
    #matchForm {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px; /* Расстояние между текстовыми полями */
    }

    .form-group {
        flex: 1;
        min-width: 45%; /* Обеспечивает, чтобы два поля помещались в строку */
    }

    button {
        flex: 1 0 100%;
    }
}

/* Опционально: стили для улучшения отображения на мобильных устройствах */
@media (max-width: 767px) {
    /* Дополнительные стили для мобильных устройств можно добавить здесь */
}
