/* Layout */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 100px 20px 20px 20px;
}

/* Header */
.login-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 60px;
    max-width: 1440px;
    margin: 0 auto;
    right: 0;
}

.logo {
    width: clamp(80px, 8vw, 120px); 
    z-index: 999;
    position: absolute;
    top: 24px;
    left: 30px;
}

.logo.animate {
    animation: moveLogo 1s ease-in-out forwards;
}

/* Signup Box */
.header-signup-box {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 20px;
    position: absolute;
    top: 40px;
    right: max(60px, calc((100% - 1440px) / 2 + 60px));
    z-index: 10;
}

.btn-signup-link {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    transition: all 100ms ease-in-out;
}

.btn-signup-link:hover {
    background-color: var(--secondary-color);
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.2);
}

/* Login Card */
.login-card {
    background-color: var(--white);
    padding: 40px 60px;
    border-radius: 30px;
    box-shadow: 0px 0px 14px 3px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 500px;
    text-align: center;
    opacity: 1;
    position: relative;
    margin: auto 0; 
}

.login-card.animate {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out 0.8s forwards;
}

.login-card h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.underline {
    width: 150px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 0 auto 30px auto;
}

/* Form Elements */
.input-container {
    display: flex;
    align-items: center;
    background-color: var(--white);
    border: 1px solid #D1D1D1;
    border-radius: 10px;
    padding: 12px 20px;
    margin-bottom: 38px;
    position: relative;
}

.input-container input {
    flex: 1;
    font-size: 16px;
    width: 100%;
    padding-right: 30px;
}

.input-container input::placeholder {
    color: #D1D1D1;
}

.input-icon {
    position: absolute;
    right: 20px;
    width: 20px;
    height: 20px;
    object-fit: contain;
    cursor: pointer;
}

.error-border {
    border-color: #D40018 !important;
    box-shadow: 0 0 4px 0 #D40018;
}

.input-error-msg {
    color: #D40018;
    font-size: 16px;
    position: absolute;
    top: 100%;
    margin-top: 4px;
    left: 0;
}

.validation-msg {
    color: #D40018;
    font-size: 16px;
    margin-top: -15px;
    margin-bottom: 4px;
    text-align: left;
    width: 100%;
    padding-left: 0;
    visibility: hidden;
    min-height: 20px;
}

.validation-msg.visible {
    visibility: visible;
}

.options-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}


.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
}

/* Buttons */
.button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-guest {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    border: 1px solid var(--primary-color);
    transition: all 100ms ease-in-out;
}

.btn-guest:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* Footer */
.login-footer {
    position: absolute;
    bottom: 24px;
    display: flex;
    gap: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.login-footer a {
    color: #A8A8A8;
    font-size: 16px;
    transition: color 100ms ease-in-out;
}

.login-footer a:hover {
    color: var(--secondary-color);
}

/* Signup Specific */
.arrow-back {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 32px;
    height: 32px;
    transition: transform 100ms ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrow-back:hover {
    transform: scale(1.1);
}

.privacy-policy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 16px;
}

.privacy-policy a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
}

/* Background Animation */
.login-page.animate {
    animation: bgFade 1s ease-in-out forwards;
}

@keyframes bgFade {
    0% {
        background-color: var(--primary-color);
    }

    100% {
        background-color: transparent;
    }
}

/* Animations */
@keyframes moveLogo {
    0% {
        width: 250px;
        top: 50vh;
        left: 50vw;
        transform: translate(-50%, -50%);
    }

    100% {
        width: clamp(80px, 8vw, 120px); 
        top: 40px;
        left: 60px;
        transform: translate(0, 0);
    }
}

@keyframes moveLogoMobile {
    0% {
        width: 150px;
        top: 50vh;
        left: 50vw;
        transform: translate(-50%, -50%);
    }

    100% {
        width: clamp(60px, 15vw, 90px);
        top: 20px;
        left: 20px;
        transform: translate(0, 0);
    }
}

@keyframes moveLogoMobileSmall {
    0% {
        width: 150px;
        top: 50vh;
        left: 50vw;
        transform: translate(-50%, -50%);
    }

    100% {
        width: 60px;
        top: 20px;
        left: 20px;
        transform: translate(0, 0);
    }
}

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

/* Responsive (< 600px) */
@media (max-width: 600px) {

    .login-header {
        padding: 20px;
    }

    .login-card {
        padding: 30px 20px;
        margin-bottom: 40px;
    }

    .button-container {
        flex-direction: column;
    }

    .logo.animate {
        animation-name: moveLogoMobile;
    }

    .login-footer {
        position: static;
        margin-top: auto;
        margin-bottom: 20px;
        transform: none;
    }

    .login-page {
        padding-top: 140px;
    }

    .header-signup-box {
        position: static;
        margin-top: 20px;
        justify-content: center;
        font-size: 16px;
        margin-bottom: 40px;
    }
}

@media (max-width: 450px) {
    .options-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

/* Landscape / Short Screen Fix */
@media (max-height: 600px) {
    .logo {
        width: 60px !important;
    }

    .login-page {
        padding-top: 100px;
        height: auto;
    }

    .login-footer {
        position: static;
        transform: none;
        margin-top: 30px;
        margin-bottom: 20px;
    }

    .header-signup-box {
        position: static;
        margin-top: 20px;
        justify-content: center;
        margin-bottom: 20px;
    }
}

/* Extra Small Devices (< 380px) */
@media (max-width: 380px) {
    .logo {
        width: 60px;
    }

    .logo.animate {
        animation-name: moveLogoMobileSmall;
    }

    .login-card {
        padding: 25px 20px;
    }

    .login-card h1 {
        font-size: 40px;
        margin-bottom: 20px;
    }

    .input-container {
        padding: 10px 15px;
    }

    .underline {
        margin-bottom: 20px;
    }
}

/* Auth Toast Message */
.auth-toast {
    position: fixed;
    bottom: 50%;
    left: 50%;
    transform: translate(-50%, 50%);
    background-color: var(--primary-color);
    color: white;
    padding: 20px 40px;
    border-radius: 20px;
    font-size: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 999;
    animation: slideInAndOut 3s ease-in-out forwards;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: center;
}

@keyframes slideInAndOut {
    0% {
        opacity: 0;
        transform: translate(-50%, 100px);
    }
    10% {
        opacity: 1;
        transform: translate(-50%, 50%);
    }
    90% {
        opacity: 1;
        transform: translate(-50%, 50%);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, 100px);
    }
}