/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styling */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f7fc;
    color: #333;
    padding: 20px;
}

/* Container for the page content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Page heading */
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
}

/* Section titles */
h2 {
    color: #3498db;
    margin-bottom: 10px;
    text-align: center;
}

/* Form styling */
form {
    max-width: 600px; /* Restricts the width */
    margin: 0 auto 40px; /* Centres the form and adds bottom spacing */
    padding: 20px;
    background-color: #ecf0f1;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns for a compact layout */
    gap: 15px;
}

form label {
    font-size: 14px;
    color: #2c3e50;
    display: block;
    margin: 0;
}

form input[type="text"],
form input[type="number"],
form select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 5px;
}

form input[type="submit"] {
    grid-column: span 2; /* Makes the button span both columns */
    padding: 10px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

form input[type="submit"]:hover {
    background-color: #2980b9;
}

/* Table styling */
table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #3498db;
    color: white;
}

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

table tr:hover {
    background-color: #f1f1f1;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    form {
        grid-template-columns: 1fr; /* Switch to a single-column layout */
    }

    form label {
        font-size: 14px;
    }

    form input[type="text"],
    form input[type="number"],
    form input[type="submit"] {
        font-size: 14px;
    }

    table th, table td {
        font-size: 14px;
        padding: 8px;
    }
}

