body {
    font-family: "Arial", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1e1e1e;
    color: #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-direction: column;
    overflow-x: hidden;
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #fff;
}

form {
    background-color: #333;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 300px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
    color: #fff;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    background-color: #444;
    color: #fff;
    border: 1px solid #666;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #28a745;
    outline: none;
}

input[type="submit"] {
    width: 100%;
    padding: 10px;
    background-color: #444;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

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

.error-message {
    background-color: red;
    color: white;
    padding: 10px 20px;
    /* Add more horizontal padding for better spacing */
    text-align: center;
    margin-bottom: 20px;
    border-radius: 5px;
    width: auto;
    /* Remove the 100% width */
    max-width: 300px;
    /* Limit the width to match the form's width */
    box-sizing: border-box;
    border: 1px solid #f5c6cb;
}

.error-message {
    background-color: #f8d7da;
    /* Light red background */
    color: #721c24;
    /* Dark red text for better contrast */
    padding: 10px 20px;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 5px;
    width: auto;
    max-width: 300px;
    box-sizing: border-box;
    border: 1px solid #f5c6cb;
}