body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f4f6f9;
    margin: 0;
    padding: 0;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 20px auto;
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

h1 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 15px;
    color: #005bac;
}

form {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

input[type="number"] {
    padding: 10px 15px;
    font-size: 16px;
    border: 2px solid #005bac;
    border-radius: 6px;
    outline: none;
    width: 250px;
    transition: border-color 0.3s ease;
}

input[type="number"]:focus {
    border-color: #ff9800;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    background: #005bac;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: #ff9800;
}

/* Таблица */
table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
    font-size: 15px;
}

th, td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    word-break: break-word;
}

th {
    background-color: #005bac;
    color: white;
    text-align: left;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

.message-error {
    color: #d32f2f;
    text-align: center;
    font-weight: bold;
}

/* 📱 Мобильная адаптация */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 18px;
    }

    form {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    input[type="number"] {
        width: 100%;
        font-size: 14px;
    }

    button {
        width: 100%;
        font-size: 14px;
    }

    table, thead, tbody, th, td, tr {
        display: block;
        width: 100%;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 12px;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
        padding: 8px;
    }

    td {
        border: none;
        display: flex;
        justify-content: space-between;
        padding: 6px 8px;
        font-size: 14px;
    }

    td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #005bac;
        flex-basis: 50%;
    }
}
