
/* Animated Background */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(-45deg, #b0c4de, #0091d6, #434cc5, #87a8c4);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}


h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

p {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    max-width: 80%;
    text-align: center;
    margin-bottom: 15px;
}

/* ===== Login Page Layout ===== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
}

.login-container {
    display: flex;
    flex-direction: row;
    width: 750px;
    max-width: 90%;
    height: auto; /* Change from fixed height */
    min-height: 55vh; /* Ensures compactness but allows flexibility */
    max-height: 60vh; /* Prevents unnecessary stretching */
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    align-items: stretch;
    transition: all 0.3s ease-in-out;
}

.login-container:hover {
    box-shadow: 0px 12px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

/* ===== Login Form Container ===== */
.login-form-container {
    width: 50%;
    padding: 55px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ===== Login Info Container ===== */
.login-info-container {
    width: 50%;
    background: #2c3e50 url('https://cdn.underhost.com/images/login.jpg') center/cover no-repeat;
    color: #fff;
    text-align: center;
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 0 15px 15px 0;
    position: relative;
}

.login-info-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 0 15px 15px 0;
    z-index: 1;
	background: linear-gradient(135deg, rgba(44, 62, 80, 0.9) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.login-info-container h2 {
    color: #fff;
    font-size: 26px;
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
}

.login-info-container p {
    font-size: 15px;
    color: #ddd;
    font-family: 'Roboto', sans-serif;
    max-width: 90%;
    line-height: 1.6;
}

.login-info-container * {
    position: relative;
    z-index: 2;
}

.branding img {
    width: 180px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.branding img:hover {
    transform: scale(1.05);
}

/* ===== Input Group ===== */
.input-group {
    position: relative;
    margin-bottom: 25px;
    width: 100%;
    max-width: 350px;
    text-align: left;
    margin: auto;
}

.input-group input {
    padding: 16px 45px 16px 40px; /* Increase height */
}

.input-group + .input-group {
    margin-top: 15px;
}

.input-group i:first-child {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 16px;
}

.input-group input {
    width: 100%;
    padding: 14px 45px 12px 40px;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

.input-group input:focus {
    border-color: #3EB489;
    box-shadow: 0 0 0 3px rgba(62, 180, 137, 0.2);
    background-color: #fff;
}

.toggle-password-container {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.toggle-password-container i {
    font-size: 18px;
    color: #888;
}

/* ===== Extra Options ===== */
.extra-options {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: bold;
    max-width: 350px;
    align-items: center;
    margin: auto;
}

.extra-options a {
    color: #007bb5;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.extra-options label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.extra-options a:hover {
    color: #005a8c;
    text-decoration: underline;
}

.extra-options input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    outline: none;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.extra-options input[type="checkbox"]:checked {
    background-color: #3EB489;
    border-color: #3EB489;
}

.extra-options input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    color: white;
    font-size: 12px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* ===== Buttons ===== */
.login-btn, 
.google-btn {
    padding: 16px; /* Makes buttons feel more premium */
}

.login-btn {
    width: 100%;
    max-width: 350px;
    padding: 16px;
    background: linear-gradient(135deg, #3EB489 0%, #2e8b57 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 15px auto;
    box-shadow: 0 4px 6px rgba(62, 180, 137, 0.1);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(62, 180, 137, 0.15);
}

/* Loading Spinner Styles */
.loading-spinner {
    display: none;
    margin-left: 10px;
    font-size: 16px;
}

.login-btn .loading-spinner i {
    color: white;
    animation: fa-spin 1s infinite linear;
}

/* Button Loading State */
.login-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.login-btn.loading #buttonText {
    display: inline-block;
}

.login-btn.loading .loading-spinner {
    display: inline-block;
}

/* ===== Google Login Button Styling Fix ===== */
.google-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #fff !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    transition: all 0.3s ease-in-out;
    padding: 14px 20px !important;
    width: 100% !important;
    max-width: 350px !important;
    margin: 15px auto !important;
    cursor: pointer;
    font-size: 16px !important;
    border-radius: 8px !important;
    height: auto !important;
}

/* Force Google logo and text styling */
.google-btn i,
.g_id_signin div {
    font-size: 18px !important;
    margin-right: 10px !important;
    background: linear-gradient(45deg, #db4437, #f4b400, #0f9d58, #4285f4) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* Force Google button to stay centered */
.g_id_signin {
    width: 100% !important;
    max-width: 350px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: auto !important;
}

/* Ensure hover effect stays */
.google-btn:hover {
    border-color: #4285f4 !important;
    background: rgba(66, 133, 244, 0.1) !important;
    transform: scale(1.05) !important;
}

/* Modern Login Heading Styles */
.login-heading {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #2c3e50 0%, #4a6b8a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    position: relative;
    padding-bottom: 10px;
    display: inline-block;
}

.login-heading::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3EB489, #2e8b57);
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-subtext {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    max-width: 80%;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    position: relative;
    padding-bottom: 10px;
}

.login-subtext::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* ===== Register Link ===== */
.register-link {
    margin-top: 20px;
    font-size: 14px;
    text-align: center;
    font-weight: bold;
    color: #333;
    padding-left: 20px; /* Add this line to shift right */
}

.register-link a {
    color: #007bb5;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease-in-out;
    display: inline-block; /* Add this for better spacing */
}

.register-link a:hover {
    color: #005a8c;
    text-decoration: none;
    opacity: 0.9;
}

/* ===== Copyright Notice ===== */
.copyright {
    margin-top: 25px;
    font-size: 8px;
    color: #666;
    text-align: center;
}

/* ===== Media Queries ===== */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        width: 90%;
        height: auto; /* Allow it to grow based on content */
        max-height: 90vh; /* Maximum height to prevent it from exceeding the screen */
        align-items: center;
    }

    .login-form-container,
    .login-info-container {
        width: 100%;
        padding: 25px;
        border-radius: 0;
        text-align: center;
        align-items: center;
        padding-bottom: 20px; /* Add space below the form */
    }

    .login-info-container {
        border-radius: 0 0 15px 15px;
    }

    .input-group,
    .login-btn,
    .google-btn,
    .extra-options {
        max-width: 280px;
        margin: 0 auto 22px auto;
        text-align: center;
    }

    .extra-options {
        display: flex;
        justify-content: center;
        gap: 10px;
        font-size: 12px;
    }

    .input-group + .input-group {
        margin-top: 12px;
    }
    
    .input-group {
        max-width: 100%; /* Allow input fields to stretch */
    } 
    .input-group input {
        padding: 16px 45px 16px 40px;
        font-size: 18px;
        width: 100%; /* Ensure inputs take full width */
    }
    
    .branding img {
    width: 90%;
    filter: drop-shadow(0px 0px 8px rgba(255, 255, 255, 0.7));
    margin-bottom: 20px; /* Increase spacing */
    }


    .login-btn,
    .google-btn {
        width: 100%; /* Ensures it takes full available space */
        max-width: 320px; /* Slightly bigger on small screens */
        padding: 18px;
        font-size: 18px;
    }
    .login-btn {
        max-width: 320px; /* Slightly wider */
        padding: 18px; /* Increase button size */
        font-size: 18px; /* Improve readability */
    }
}