/* Base Styles */
body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow-x: hidden; /* Fix horizontal scrolling */
    overflow-y: auto; /* Allow vertical scrolling if content overflows */
    background-color: #f4f4f9; /* Subtle background for contrast */
    box-sizing: border-box; /* Ensure consistent box model */
}

/* Login Container */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px; /* Limit the container width for responsiveness */
    background: white;
    box-sizing: border-box; /* Prevent padding from breaking layout */
    overflow: hidden; /* Prevent content overflow inside the container */
}

/* Debug Info */
.debug-info {
    margin-top: 20px;
    padding: 10px;
    background-color: #f8f8f8;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 12px;
    color: #333;
    white-space: pre-wrap; /* Preserve whitespace formatting */
    overflow-wrap: break-word; /* Ensure long strings wrap */
    max-width: 100%;
    line-height: 1.5; /* Improve readability */
}

/* Title (Heading) */
.login-container h2 {
    color: black;
    margin-bottom: 20px;
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2rem); /* Responsive font size */
    white-space: normal; /* Allow the text to wrap */
    word-wrap: break-word; /* Break long words if necessary */
    overflow-wrap: break-word; /* Extra compatibility for word wrapping */
}

/* Labels */
.login-container label {
    color: blue;
    margin-top: 10px;
    margin-bottom: 5px;
    display: block;
}

/* Form */
.login-container form {
    width: 100%;
    max-width: 600px;
}

/* Inputs */
.login-container input {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

/* Buttons */
.login-button {
    background-color: blue;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    max-width: 300px; /* Restrict the button width */
    margin: 20px auto;
    text-align: center;
    font-size: 1rem;
}

.login-button:hover {
    background-color: darkblue;
}

/* Links */
a {
    text-align: center;
    font-size: 0.9rem;
    display: block;
    margin-top: -10px;
    color: blue;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Error Message */
.error-message {
    color: red;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 15px;
}

/* Breakpoints for Responsive Design */

/* Tablet (max-width: 768px) */
@media (max-width: 768px) {
    .login-container {
        padding: 20px;
        border-radius: 8px;
        max-width: 90%; /* Reduce max-width for smaller screens */
    }

    .login-container h2 {
        font-size: 1.5rem; /* Slightly smaller font for tablets */
    }

    input {
        padding: 12px;
        margin-bottom: 15px;
    }

    .login-button {
        padding: 8px;
        font-size: 0.9rem;
    }

    a {
        font-size: 0.8rem;
    }
}

/* Mobile Phones (max-width: 480px) */
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
        border-radius: 5px;
        max-width: 95%; /* Reduce max-width for mobile */
    }

    .login-container h2 {
        font-size: 1.2rem; /* Smaller font size for small screens */
    }

    input {
        padding: 10px;
        margin-bottom: 10px;
    }

 .login-button {
    display: inline-block;
    background-color: blue;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 10px;
}

    a {
        font-size: 0.7rem;
        margin-top: 5px;
    }
}
