/* General Body Styling */
body {
    background-color: #f0f2f5;
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/* Login Box */
.login-box {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 420px;
    text-align: center;
    border: 1px solid #e0e0e0;
    margin: 20px;
}

.login-box h2 {
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
}

/* Error Message */
.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* Success Message */
.success {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

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

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.25);
    outline: none;
}

/* Checkbox Styling */
.form-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.form-check-input {
    margin-right: 10px;
}

.form-check-label {
    font-weight: normal;
    color: #555;
}

/* Button Styling */
.btn-primary {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* Links */
.login-box a {
    color: #007bff;
    text-decoration: none;
    transition: text-decoration 0.3s;
}

.login-box a:hover {
    text-decoration: underline;
}

.forgot-password {
    font-size: 14px;
}

/* Divider */
hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #e0e0e0;
}

/* Signup Link */
.signup-link {
    margin-top: 15px;
}

.signup-link p {
    margin: 0;
    color: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-box {
        padding: 30px;
        width: 95%;
        margin-top: 140px;
        /* Ensure enough space below header */
        margin-bottom: 40px;
    }

    /* Disable vertical centering on mobile to prevent overlap */
    body {
        height: auto;
        min-height: 100vh;
        align-items: flex-start;
        /* Align to top */
        padding-bottom: 20px;
    }

    .login-box h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .login-box h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .form-control {
        padding: 10px;
        font-size: 14px;
    }

    .btn-primary {
        padding: 10px;
        font-size: 15px;
    }
}