/* Reset and base styles */
body, html {
    margin: 0;
    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;
    align-items: center; /* Ensure content is centered horizontally */
    min-height: 100vh;
    padding-top: 60px; /* Adjust for the fixed navbar height */
}

*, *:before, *:after {
    box-sizing: border-box;
}

/* Navigation Bar */
nav {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex; /* Added for centering the content */
    justify-content: center; /* Centers the content horizontally */
}

nav .logo strong {
    font-size: 24px;
}

nav ul {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
    /* Centering nav items */
    justify-content: center; /* Added for horizontal centering */
}

nav ul li {
    margin: 0 20px;
}

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;
}

/* Main content and form styling */
.main {
    width: 100%;
    max-width: 600px; /* Increased max-width for a bigger form */
    padding: 40px; /* Increased padding for a larger appearance */
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 80px auto 0; /* Increased top margin to account for fixed navbar */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    background-color: white;
    /* Centering form within the main area */
    align-items: center; /* Ensures form and error messages are centered */
}

.error-message {
    color: #D8000C;
    background-color: #FFD2D2;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
    width: 100%; /* Full width to match the form inputs */
}

.form-group {
    margin-bottom: 20px;
    width: 100%; /* Ensures form groups take up full width */
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 15px; /* Slightly increased padding */
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

button[type="submit"] {
    width: 100%;
    padding: 15px 0; /* Adjusted for visual balance */
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #0056b3;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .main {
        margin-top: 60px; /* Reduced top margin for smaller screens */
    }
}

@media screen and (max-width: 480px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 5px 0;
    }
}
