/* Reset and base styles */
body, html {
    margin: 0 auto;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers content vertically */
    min-height: 100vh; /* Ensures the body takes at least the height of the viewport */
    align-items: center; /* Centers content horizontally */
}

*, *:before, *:after {
    box-sizing: border-box;
}

/* Navigation Bar */
nav {
    background-color: #007bff;
    color: white;
    padding: 10px 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

nav .logo strong {
    font-size: 24px;
}

nav ul {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

nav ul li a:hover,
nav ul li a:focus {
    background-color: #0056b3;
}

/* Container for the form */
.container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%; /* Responsive width */
    max-width: 400px; /* Prevents the form from being too wide */
    margin: 20px auto; /* Centering with automatic horizontal margins */
}

/* Style adjustments for form elements */
.container h1 {
    margin-bottom: 24px;
    color: #007bff;
}

.container label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
}

.container input[type="text"],
.container input[type="email"],
.container input[type="password"] {
    width: 100%;
    max-width: 500px; /* Controls the maximum width */
    padding: 12px;
    margin-bottom: 16px;
    margin-left: auto; /* Centers the input field */
    margin-right: auto; /* Centers the input field */
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.container input[type="submit"] {
    padding: 12px;
    width: auto;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    align-self: center; /* Centers the submit button */
}

.container input[type="submit"]:hover {
    background-color: #0056b3;
}

/* Responsive adjustments for better mobile viewing */
@media screen and (max-width: 768px) {
    .container {
        max-width: 95%; /* Allows the form to take up more screen width on smaller devices */
    }
}

@media screen and (max-width: 480px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 10px 0; /* More vertical space for a stacked navigation */
    }
}

/* Footer styles for consistency */
footer {
    background-color: #007bff;
    color: white;
    text-align: center;
    padding: 20px;
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
}
