﻿/* === GENERAL BODY STYLES === */
body {
    font-family: 'Poppins', 'Lato', 'Segoe UI', sans-serif;
    font-weight: 300;
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #3d3d4f;
    background: linear-gradient(135deg, #fdfdfd, #faf7ff);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.6s ease, color 0.4s ease;
}

/* === AUTH CONTAINER === */
#auth {
    height: 100vh;
    overflow: hidden;
    /*display: flex;*/
}
    /*#auth #auth-right {
        height: 100%;
        background-image: linear-gradient(360deg, #520a57,#d23c7deb);
        padding: 5rem
    }*/

    /* === LEFT SIDE (LOGIN FORM) === */
    #auth #auth-left {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 3rem 2rem;
        background-image: url('../../../../../assets/images/bg/6.jpg');
        background-repeat: no-repeat;
        background-position: center center; /* keeps it centered */
        background-position-y: -110px;
        background-size: 100% 100%; /* fully stretch to fit the box */
        background-color: #f7f7f7; /* fallback background */
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.05);
        z-index: 3;
        animation: fadeInLeft 2s ease;
        transition: all 0.6s ease;
    }












        /* Inputs, Buttons, Alerts */
        #auth #auth-left #loginButton,
        #auth #auth-left .form-group,
        #auth #auth-left .alert {
            border: 1px solid rgba(162, 90, 162, 0.5);
            border-radius: 2px;
            max-width: 65%;
            display: block;
            margin: 0.75rem auto;
            text-align: center;
            box-shadow: 0 3px 12px rgba(162, 90, 162, 0.1);
            transition: all 0.3s ease-in-out;
        }

            #auth #auth-left #loginButton:hover,
            #auth #auth-left .form-group:hover {
                box-shadow: 0 5px 16px rgba(162, 90, 162, 0.25);
                transform: translateY(-2px);
            }

            .form-control:focus {
                filter: drop-shadow(0 1px 1px rgb(180, 108, 180, 0.97));
            }




/* === RIGHT SIDE (BACKGROUND & TEXT) === */
#auth #auth-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    position: relative;
    overflow: hidden;
    flex-direction: column;
}

    /* Smooth Background Fade-in */
    #auth #auth-right::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, #6d247a46, #b664ca20), url('../../images/bg/askari3.webp') center/cover no-repeat;
        opacity: 0;
        animation: fadeInBg 1.5s ease forwards;
        z-index: 0;
    }

    /* Layer Content Above */
    #auth #auth-right > * {
        position: relative;
        z-index: 1;
    }
/* === ANIMATIONS === */
@keyframes fadeInBg {
    to {
        opacity: 1;
    }
}

@keyframes fadeInLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}


/* === 3D LOGO SPIN EFFECT === */
#auth #auth-left .auth-logo {
    margin-top: 6rem;
    text-align: center;
    perspective: 1200px; /* stronger 3D depth */
    color: #38263b;
}

    /* === 3D LOGO IMPROVED ANIMATION === */
    #auth #auth-left .auth-logo img {
        height: 6rem;
        transform-style: preserve-3d;
        animation: logoIntro 3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
        transition: transform 0.5s ease, filter 0.4s ease;
        filter: drop-shadow(0 2px 2px rgba(34, 34, 34, 0.84));
    }
        /* When intro finishes, start smooth spin */
        #auth #auth-left .auth-logo img.loaded {
            animation: spin3D 8s linear infinite; /* linear is smoother for continuous spin */
        }

        /* Hover effect — gentle pop */
        #auth #auth-left .auth-logo img:hover {
            animation: hoverUp 0.6s ease-out forwards;
            transform: scale(1.12) translateZ(20px);
            filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.6));
        }

/* Continuous 3D rotation */
@keyframes spin3D {
    0% {
        transform: rotateY(0deg);
    }

    100% {
        transform: rotateY(360deg);
    }
}

/* === Smooth Page-Load Logo Intro === */
/*@keyframes logoIntro {
    0% {
        opacity: 0;
        transform: rotateY(0deg) scale(0.6) translateZ(0);
        filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.6));
    }


    60% {
        opacity: 1;
        transform: rotateY(0deg) scale(1.8) translateZ(30px);
        filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.6));
    }


    100% {
        transform: rotateY(0deg) scale(1) translateZ(0);
        filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.4));
    }
}
*/

@keyframes logoIntro {
    0% {
        opacity: 0;
        transform: translateX(1500px) scale(0.5) translateZ(0);
        filter: drop-shadow(0 0px 0px rgba(0, 0, 0, 0));
    }

    30% {
        opacity: 1;
        transform: translateX(30px) scale(2) translateZ(25px);
        filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.55));
    }

    60% {
        transform: translateX(-10px) scale(1.3) translateZ(12px);
        filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.48));
    }

    80% {
        transform: translateX(5px) scale(0.95) translateZ(5px);
        filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.42));
    }

    100% {
        transform: translateX(0) scale(1) translateZ(0);
        filter: drop-shadow(0 2px 2px rgba(34, 34, 34, 0.84));
    }
}

/* Hover pop (upright, smooth) */
@keyframes hoverUp {
    0% {
        transform: rotateY(0deg) scale(1) translateZ(0);
    }

    50% {
        transform: rotateY(0deg) scale(1.25) translateZ(40px);
    }

    100% {
        transform: rotateY(0deg) scale(1.15) translateZ(35px);
    }
}


#auth #auth-left .auth-logo h5 {
    margin-top: -1rem;
    color: black !important;
    font-size: 0.9rem;
    font-weight: 600;
}

#auth #auth-left .auth-title {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
    text-align: center;
    font-weight: 600;
    color: #5c2b7b;
    text-transform: uppercase;
}

#auth #auth-left .auth-subtitle {
    font-size: 0.8rem;
    color: #9b8dab;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
}

/* === ANIMATED TEXT (RIGHT PANEL) === */
#auth #auth-right .animated-text {
    position: absolute;
    bottom: 4rem;
    left: 2rem;
    color: #fff;
    text-shadow: 1px 2px 8px rgba(0, 0, 0, 0.6);
    animation: fadeInUp 8s ease both;
}

    #auth #auth-right .animated-text h4 {
        font-size: 2rem;
        margin: 0 0 0.3rem 0;
        color: #fff;
        font-weight: 500;
    }

    #auth #auth-right .animated-text small {
        font-size: 0.95rem;
        opacity: 0.9;
    }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === DARK MODE === */
html[data-bs-theme=dark] #auth-right::before {
    background: linear-gradient(135deg, #361542, #5a298d, #f17221);
}


/* === RESPONSIVE (MOBILE OPTIMIZATION) === */
@media (max-width: 991px) {

    #auth {
        /*flex-direction: column;*/
        height: auto;
        min-height: 100vh;
    }

        #auth #auth-left {
            border-right: none;
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
            padding: 2rem 1.5rem;
            /*  background: linear-gradient(135deg, #fdfdfd16, #faf7ff2c);*/
            box-shadow: none;
        }

            #auth #auth-left #loginButton,
            #auth #auth-left .form-group {
                max-width: 80%;
                width: 80%;
            }

        #auth #auth-right {
            padding: 2rem 1rem;
            min-height: 40vh;
            background: linear-gradient(135deg, rgba(162,90,162,0.5), rgba(208,132,255,0.4));
        }

            #auth #auth-right::before {
                background: linear-gradient(180deg, rgba(109,36,122,0.6), rgba(182,100,202,0.4)), url('../../images/bg/askari3.webp') center/cover no-repeat;
                opacity: 0.25;
            }

            #auth #auth-right .animated-text {
                position: relative;
                bottom: 0;
                left: 0;
                text-align: center;
                margin-top: 15rem;
            }

                #auth #auth-right .animated-text h4 {
                    font-size: 1.5rem;
                }

                #auth #auth-right .animated-text small {
                    font-size: 0.85rem;
                }
}
