/* Define color scheme using CSS variables */
:root {
    --secondary-color: #007b65;
    --primary-color: #003366;
    --animation-duration: 0.3s;
    --form-background-color: rgba(255, 255, 255, 0.4);
    --background-animation: linear-gradient(195deg, #003366, #007b65);
    --background-size: 600% 600%;
    --border-radius: 7px;
}

body {
    font-family: 'Montserrat', sans-serif; /* Updated font-family to match the HTML */
    margin: 0;
    padding: 0;
    overflow: hidden !important;
}

/* Logo styling */
/* Logo container */
.login-logo {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

/* Default logo state */
.logo-default {
    width: 150px;
    height: auto;
    border-radius: 50%;
    animation: logoFadeIn var(--animation-duration) ease;
}

/* Keyframes for animations */
@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes containerPop {
    0% {
        transform: scale(0.9);
    }
    70% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Login form container styling with glass-like background */
.login-container {
    animation: containerPop var(--animation-duration) ease-out;
    color: var(--primary-color); /* Text color for contrast */
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
    height: 100%;
}

.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Use the viewport height to ensure full height coverage */
}

.login-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.login-card {
    width: 100%;
    max-width: 700px;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.3); /* Glass-like background */
    -webkit-backdrop-filter: blur(10px); /* Increased blur for a frosted glass effect */
    backdrop-filter: blur(10px); /* Increased blur for a frosted glass effect */
    color: #f3f3f3ea; /* Text color for contrast */
    border-radius: var(--border-radius);
}

/* Login form styling */
#loginForm {
    background-color: var(--form-background-color); /* Using variable for form background color */
    color: var(--primary-color); /* Text color for contrast */
    padding: 60px; /* Increased padding for a more spacious form */
    border-radius: 12px; /* Slightly more rounded corners for a softer look */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); /* Enhanced shadow for more depth */
    -webkit-backdrop-filter: blur(12px); /* For Safari 9+, iOS Safari 9+ */
    backdrop-filter: blur(12px); /* Increased blur for a frosted glass effect */
    transition: transform var(--animation-duration) ease-out;
}

#loginForm:hover {
    transform: translateY(-10px); /* Enhanced lift effect on hover */
}

/* Button styling */
.ms-login {
    border: 1px solid #e0e0e0;
    transition: background-color var(--animation-duration) ease;
    animation: buttonFadeIn var(--animation-duration) ease;
    border-radius: var(--border-radius);
}

@keyframes buttonFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn:hover {
    background-color: darken(var(--primary-color), 10%); /* Darken button on hover for feedback */
}

.btn-secondary {
    background-color: var(--secondary-color);
    border: none;
    padding: 15px 30px;
    transition: background-color var(--animation-duration) ease;
}

.btn-secondary:hover {
    background-color: darken(var(--secondary-color), 10%);
}

.login-card {
    opacity: 0;
    animation: fadeIn var(--animation-duration) forwards;
}

.text-gradient-to-r {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-gradient-to-r:hover {
    background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Responsive adjustments for the new login page */
@media (max-width: 768px) {
    html, body {
        max-width: 100vw;
        height: auto;
        margin: 0;
        padding: 0;
        overflow: hidden; /* Prevent unwanted scrollbars */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        position: relative;
    }
    .min-h-screen {
        min-height: 100vh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    .max-w-md, .w-full {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        overflow: hidden !important;
    }
    .login-logo {
        width: 200px !important;
        max-width: 60vw !important;
        display: block;
        margin: 0 auto 0.5rem auto;
    }
    .login-card {
        width: 90vw !important;
        max-width: 340px !important;
        margin: 0 auto !important;
        padding: 1.2rem 0.7rem !important;
        border-radius: 12px !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 16px rgba(0,0,0,0.08);
        background: #fff;
        position: relative;
        z-index: 1;
        overflow: hidden !important;
    }
    .ms-login {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        border: 1px solid #e0e0e0;
        min-width: 0;
        overflow: hidden;
        font-size: 1rem !important;
    }
    .flex.justify-center {
        justify-content: center !important;
        display: flex !important;
        width: 100%;
        overflow: hidden !important;
    }
    .flex.justify-center img {
        width: 200px !important;
        max-width: 60vw !important;
        display: block;
        margin: 0 auto 0.5rem auto;
    }
    #logo-text, .text-5xl {
        font-size: 3rem !important;
        line-height: 3rem !important;
        text-align: center !important;
        width: 100%;
        margin: 0 auto 0.5rem auto;
    }
    .mb-12 {
        margin-bottom: 1.2rem !important;
    }
    .py-8 {
        padding-top: 1.2rem !important;
        padding-bottom: 1.2rem !important;
    }
    .px-4, .sm\:px-6, .lg\:px-8 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    .w-full.flex.items-center.justify-center.px-4.py-3 {
        flex-direction: column !important;
        padding: 0.75rem 0.5rem !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .w-5.h-5.mr-2 {
        margin-right: 0.5rem !important;
    }
    .text-sm {
        font-size: 0.95rem !important;
    }
    .text-center {
        text-align: center !important;
    }
    .space-y-8 > * + * {
        margin-top: 1.25rem !important;
    }
    /* Ensure the login card and content are above the animation */
    .max-w-md, .login-card, .text-center, .footer {
        position: relative;
        z-index: 1;
    }
    .footer, .text-center.text-sm.text-gray-500 {
        margin: 0 !important;
        padding: 0.5rem 0 !important;
        width: 100%;
        box-sizing: border-box;
    }
}

/*Responsive adjustments for larger screens */
@media (max-width: 1024px) {
    .right-section {
        display: none; /* Hide right section on smaller screens */
    }

    .login-container {
        padding: 2rem; /* Increase padding for smaller screens */
    }

    .login-card {
        box-shadow: var(--box-shadow); /* Apply consistent box shadow */
        border-radius: var(--border-radius); /* Apply consistent border radius */
        align-items: center;
        max-width: 700px; /* Limit width for better spacing */
    }

    .logo-default {
        width: 125px; /* Adjust logo size for smaller screens */
        height: auto; /* Maintain aspect ratio */
        border-radius: 50%; /* Maintain circular shape */
    }
    .logo-wink {
        width: 125px; /* Adjust logo size for smaller screens */
        height: auto; /* Maintain aspect ratio */
        border-radius: 50%; /* Maintain circular shape */
    }

    .ms-login {
        width: 100%; /* Full width for the login button */
        max-width: 300px; /* Maximum width to ensure it's not too large */
        height: auto; /* Maintain aspect ratio */
        margin: 1rem auto; /* Increase margin to center the button and add spacing */
        box-shadow: var(--box-shadow); /* Apply consistent box shadow */
        border-radius: var(--border-radius); /* Apply consistent border radius */
    }
}