body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #0056b3;
    text-align: center;
    margin-bottom: 30px;
}

#ipForm {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px; /* Max width for the form */
    margin-bottom: 30px;
}

#ipForm div {
    margin-bottom: 15px; /* Space between input groups */
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #555;
}

input[type="text"] {
    width: calc(100% - 22px); /* Account for padding and border */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

input[type="text"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

#calculateButton {
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    width: 100%;
    transition: background-color 0.3s ease;
}

#calculateButton:hover {
    background-color: #0056b3;
}

#results {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px; /* Match form width */
    margin-top: 0; /* Removed default margin-top as form has margin-bottom */
}

#results h3 {
    color: #0056b3;
    margin-top: 0; /* Remove default margin for h3 if it's the first child */
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

#results ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#results ul li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

#results ul li:last-child {
    border-bottom: none;
}

#results p.error-message { /* Class for error messages */
    color: #D8000C; /* Red for errors */
    background-color: #FFD2D2; /* Light red background */
    border: 1px solid #D8000C;
    padding: 10px;
    border-radius: 4px;
    margin-top: 0;
}
