html,
body{

    width:100%;
    height:100%;
    overflow:hidden;
}

/*========================== AUTH PAGE =========================*/
.auth-page{

    display:grid;
    grid-template-columns:1fr 500px;
    width:100%;
    height:100vh;
    overflow:hidden;
}

/*========================= HERO SECTION ===========================*/
.auth-hero{

    position:relative;
    height:100%;
    overflow:hidden;
}

/*=========================== HERO BACKGROUNDS ==========================*/
.hero-image{

    position:absolute;
    inset:0;
    background-size:cover;
    background-position:center;
    opacity:0;
    transition:opacity .8s ease;
}

/* Login Image */
.hero-login{

    background-image:url("../images/login-bg.jpg");
}
.hero-login img{
    height: 100%;
    width: 100%;
}

/* Register Image */
.hero-register{

    background-image:url("../images/register-bg.jpg");
}
.hero-register img{

    height: 100%;
    width: 100%;
}

/* Active Background */
.hero-image.active{

    opacity:1;
}

/*======================== OVERLAY ======================*/
.hero-overlay{

    position:absolute;
    inset:0;
    background: linear-gradient(135deg, 135deg, rgba(255, 213, 5, 0.55), rgba(29, 28, 28, 0.82));
}

/*========================== HERO CONTENT =======================*/
.hero-content{

    position:relative;
    z-index:10;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    height:100%;
    padding:70px 0px 50px 40px;
}

/*========================== LOGO =======================*/
.hero-logo{

    display:flex;
    align-items:center;
    gap:16px;
}
.hero-logo i{

    font-size:2.5rem;
    color:var(--primary-color);
}
.hero-logo h1{

    font-size:2.3rem;
    color:white;
    font-weight:700;
}
.hero-logo span{

    color:var(--primary-color);
}

/*============================ HERO TEXT =======================*/
.hero-text{

    max-width:520px;
    margin-top: 120px;
}
.hero-text h2{

    font-size:3.5rem;
    line-height:1.2;
    color:white;
    margin-bottom:20px;
}
.hero-text p{

    font-size:1.1rem;
    line-height:1.8;
    color:rgba(255,255,255,.82);
}

/*====================== HERO FEATURES ======================*/
.hero-features{

    display:flex;
    flex-direction:row;
    gap:22px;
    margin-top: 50px;
}
.feature{

    display:flex;
    align-items:center;
    gap:18px;
}
.feature i{

    width:60px;
    height:60px;
    display:flex;
    justify-content:center;
    align-items:center;
    border-radius:50%;
    background:var(--background-color);
    color:var(--primary-color);
    font-size:1.2rem;
}
.feature span{

    color:white;
    font-size:1rem;
    font-weight:500;
}

/*========================= AUTH SECTION ========================*/
.auth-section{

    display:flex;
    justify-content:center;
    align-items:flex-start;
    overflow-y:auto;
    height:100%;
    padding:20px;
}

/*========================= AUTH CARD =========================*/
.auth-card{

    width:100%;
    max-width:450px;
    background:var(--surface-color);
    border:1px solid var(--border-color);
    border-radius:24px;
    box-shadow:0 15px 45px rgba(0,0,0,.35);
    padding: 5px 20px 25px 20px;
}

/*======================== CARD HEADER ==========================*/
.auth-header{

    text-align:center;
}
.auth-header h2{

    color:var(--text-primary);
    font-size:2rem;
    margin-bottom:3px;
}
.auth-header p{

    color:var(--text-secondary);
    line-height:1.7;
}
.formSubtitle{

    transition:all .3s ease;
}
.formSubtitle.error{

    color:#ef4444;
    transform:translateY(-2px);
}
.formSubtitle.success{

    color:#22c55e;
    transform:translateY(-2px);
}

/*========================= FORM ==========================*/
#authForm{

    display:flex;
    flex-direction:column;
    gap:12px;
}

/*========================== INPUT GROUP ===========================*/
.input-group{

    display:flex;
    flex-direction:column;
    gap:8px;
}
.input-group label{

    font-size:.95rem;
    font-weight:500;
    color:var(--text-primary);
}

/*=========================== INPUT BOX =========================*/
.input-box{

    display:flex;
    align-items:center;
    gap:14px;
    padding:0 12px;
    height:54px;
    background:var(--background-color);
    border:1px solid var(--border-color);
    border-radius:14px;
    transition:.3s;
}
.input-box:hover{

    border-color:rgba(245,197,66,.35);
}
.input-box:focus-within{

    border-color:var(--primary-color);
    box-shadow:0 0 0 4px rgba(245,197,66,.12);
}
.input-box i{

    color:var(--text-secondary);
    font-size:1rem;
}
.input-box input{

    flex:1;
    height:100%;
    background:none;
    padding:10px ;
    border:none;
    outline:none;
    color:var(--text-primary);
    font-size:1rem;
}
.input-box input::placeholder{

    color:var(--text-muted);
}

.input-label{

    color:#ffffff;
    transition:0.3s ease;
}

.input-label.error{

    color:#ff4d4f;
}

.input-label.success{

    color:#22c55e;
}

/*=============================== SHOW PASSWORD BUTTON ===========================*/
.toggle-password{

    background:none;
    border:none;
    color:var(--text-secondary);
    cursor:pointer;
    transition:.25s;
}
.toggle-password:hover{

    color:var(--primary-color);
}

/*=========================== OPTIONS =========================*/
.form-options{

    display:flex;
    justify-content:space-between;
    align-items:center;
}
.remember-me{

    display:flex;
    align-items:center;
    gap:8px;
    cursor:pointer;
    color:var(--text-secondary);
    font-size:.92rem;
}
.forgot-password{

    color:var(--primary-color);
    text-decoration:none;
    font-size:.92rem;
}
.forgot-password:hover{

    text-decoration:underline;
}

/*============================= TERMS & CONDITIONS ==========================*/
.terms{

    display:flex;
    align-items:center;
    gap:8px;
    cursor:pointer;
    color:var(--text-secondary);
    font-size:.92rem;
}
.terms label{

    display:flex;
    align-items:flex-start;
    gap:10px;
    cursor:pointer;
}
.terms a{

    color:var(--primary-color);
    text-decoration:none;
}
.terms a:hover{

    text-decoration:underline;
}

/*======================== MAIN BUTTON ========================*/
.auth-btn{

    width:100%;
    height:50px;
    border:none;
    border-radius:14px;
    background:var(--primary-color);
    color:#111;
    font-size:1rem;
    font-weight:700;
    cursor:pointer;
    transition:.3s;
}
.auth-btn:hover{

    transform:translateY(-2px);
    box-shadow:0 10px 30px rgba(245,197,66,.35);
}
.auth-btn:active{

    transform:scale(.98);
}

/*============================== DIVIDER ====================*/
.divider{

    color: var(--text-primary);
    display:flex;
    align-items:center;
    gap:20px;
    margin:24px 0;
}
.divider::before,
.divider::after{

    content:"";
    flex:1;
    height:1px;
    background:var(--border-color);
}
.divider span{

    color:var(--text-muted);
    font-size:.85rem;
}

/* =====================================
   GOOGLE AUTHENTICATION
===================================== */
/* =====================================
   SOCIAL AUTHENTICATION
===================================== */
.social-login {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
}

#googleSignIn {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 180px;
    width: 180px;
    min-height: 32px;
    border-radius: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#googleSignIn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

.facebook-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 0 0 180px;

    width: 180px;
    height: 40px;
    padding: 0 16px;
    border: none;
    border-radius: 24px;
    background: #1877f2;
    color: #fff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.facebook-login-btn i {
    font-size: 18px;
}

.facebook-login-btn:hover {
    background: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

.facebook-login-btn:focus-visible {
    outline: 3px solid #90bfff;
    outline-offset: 4px;
}

/* Reuse the existing registration form. */
.auth-page.google-registration-mode .google-hidden-field,
.auth-page.google-registration-mode .login-only,
.auth-page.google-registration-mode .social-login,
.auth-page.google-registration-mode .divider,
.auth-page.google-registration-mode .login-footer {
    display: none !important;
}

.auth-page.google-registration-mode .register-only {
    display: block !important;
}

.auth-page.google-registration-mode .terms,
.auth-page.google-registration-mode .register-footer {
    display: flex !important;
}

/*===================== FOOTER ========================*/
.auth-footer{

    margin-top:35px;
    text-align:center;
}
.login-footer,
.register-footer{

    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px;
}
.auth-footer p{

    color:var(--text-secondary);
}
.auth-footer button{

    background:none;
    border:none;
    color:var(--primary-color);
    font-weight:600;
    cursor:pointer;
    transition:.25s;
}
.auth-footer button:hover{

    text-decoration:underline;
}

/*======================== LOGIN / REGISTER ANIMATION ========================*/
.auth-card{

    position:relative;
    transition: transform .45s ease, max-width .45s ease, padding .45s ease;
}

/*========================= HERO TRANSITION =========================*/
.hero-text{

    transition: opacity .4s ease, transform .4s ease;
}
.hero-features{

    transition: opacity .4s ease, transform .4s ease;
}
.hero-image{

    transition: opacity .8s ease, ansform 1.2s ease;
}

/*========================= REGISTER ELEMENTS ========================*/
.register-only{

    max-height:0;
    opacity:0;
    overflow:hidden;
    transform:translateY(-15px);
    transition:all .45s ease;
}

/*========================== LOGIN ELEMENTS ========================*/
.login-only{

    opacity:1;
    max-height:120px;
    transition:all .35s ease;
}

/*======================== REGISTER FOOTER =======================*/
.register-footer{

    display:none;
}

/*======================= REGISTER MODE =======================*/
.auth-page.register-mode .auth-card{

    transform:scale(1.02);
}

/* Show Register Fields */
.auth-page.register-mode .register-only{

    max-height:120px;
    opacity:1;
    transform:translateY(0);
}

/* Hide Login Fields */
.auth-page.register-mode .login-only{

    opacity:0;
    max-height:0;
    overflow:hidden;
}


/* Footer */
.auth-page.register-mode .login-footer{

    display:none;
}
.auth-page.register-mode .register-footer{

    display:flex;
}

/*============================ HERO IMAGES =======================*/
.auth-page.register-mode .hero-login{

    opacity:0;
    transform:scale(1.1);
}
.auth-page.register-mode .hero-register{

    opacity:1;
    transform:scale(1);
}

/*=========================== HERO CONTENT ==========================*/
.auth-page.register-mode .hero-text{

    animation:fadeHero .5s ease;
}

/*====================== CARD TITLE =====================*/
.auth-header h2,
.auth-header p{

    transition: opacity .35s ease, transform .35s ease;
}
.auth-page.register-mode .auth-header h2{

    transform:translateY(-4px);
}
.auth-page.register-mode .auth-header p{

    transform:translateY(-4px);
}

/*=================== BUTTON ==================*/
.auth-btn{

    transition: background .35s ease, transform .25s ease, box-shadow .25s ease;
}

/*======================== SOCIAL BUTTONS ======================*/
.social-btn{

    transition: transform .25s ease, background .25s ease, border-color .25s ease;
}

/*====================== INPUTS =========================*/
.input-box{

    transition: border-color .3s ease, box-shadow .3s ease, transform .25s ease;
}
.input-box:focus-within{

    transform:translateY(-2px);
}

/*=============================== HERO ANIMATION ======================*/
@keyframes fadeHero{

    from{

        opacity:0;
        transform:translateY(20px);
    }
    to{

        opacity:1;
        transform:translateY(0);
    }
}






/*======================= RESPONSIVE =====================*/
@media(max-width: 1050px) and (min-width: 501px){

    .auth-page{

    display:grid;
    grid-template-columns:1fr 450px;
    width:100%;
    height:100vh;
    overflow:hidden;
    }

    /*============================ HERO TEXT =======================*/
    .hero-text{

        max-width:420px;
        margin-top: 80px;
    }
    .hero-text h2{

        font-size: 38px;
        line-height:1.2;
        color:white;
        margin-bottom:20px;
        font-weight: var(--semi-bold);
    }
    .hero-text p{

        font-size: 16px;
        line-height:1.8;
        color:rgba(255,255,255,.82);
    }

    /*====================== HERO FEATURES ======================*/
    .hero-features{

        display:flex;
        flex-direction:row;
        gap:12px;
        margin-top: 50px;
    }
    .feature{

        display:flex;
        align-items:center;
        gap:8px;
    }
    .feature i{

        width:50px;
        height:50px;
        display:flex;
        justify-content:center;
        align-items:center;
        border-radius:50%;
        background:var(--background-color);
        color:var(--primary-color);
        font-size:1.2rem;
    }
    .feature span{

        color:white;
        font-size:12px;
        font-weight:500;
    }
}

@media(max-width: 860px){

    .auth-page{

        grid-template-columns:1fr;
    }
    .auth-hero{

        display: none;
    }

    .auth-card{

        padding:12px;
    }
    .auth-header h2{

        font-size:1.8rem;
    }
}

/*======================= MOBILE RESPONSIVE =====================*/
@media (max-width: 480px) {

    /*======================= AUTH PAGE =======================*/
    .auth-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        width: 100%;
        min-width: 0;
        min-height: 100dvh;
        height: auto;

        padding: 20px 16px;
        box-sizing: border-box;
    }

    /*======================= HIDE HERO =======================*/
    .auth-hero {
        display: none;
    }

    /*======================= AUTH CARD =======================*/
    .auth-card {
        width: 100%;
        max-width: 420px;
        min-width: 0;

        margin: 0 auto;
        padding: 24px 18px;

        box-sizing: border-box;

        border: 1px solid var(--border-color);
        border-radius: 24px;
    }

    /*======================= AUTH HEADER =======================*/
    .auth-header {
        text-align: center;
    }

    .auth-header h2 {
        font-size: 1.8rem;
    }

    .auth-header p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /*======================= FORM ELEMENTS =======================*/
    .auth-card form {
        width: 100%;
        min-width: 0;
    }

    .auth-card input {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /*======================= BUTTONS =======================*/
    .auth-card button {
        max-width: 100%;
        box-sizing: border-box;
    }

    /*================= MOBILE SOCIAL BUTTONS ================*/
    .social-login {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        flex-wrap: nowrap;
        gap: 16px;
    }

    #googleSignIn,
    #facebookLoginBtn {
        width: 40px;
        min-width: 40px;
        height: 40px;
        flex: 0 0 40px;
        margin: 0;
    }

    #facebookLoginBtn {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: #1877f2;
        color: #fff;
        cursor: pointer;
    }

    #facebookLoginBtn span {
        display: none;
    }

    #facebookLoginBtn i {
        font-size: 20px;
        margin: 0;
    }

}



/* Hide these fields after Google verification. */
.auth-page.google-registration-mode
.input-group.google-hidden-field {
    display: none !important;
}

/* Facebook uses the existing registration form. */
.auth-page.facebook-registration-mode .register-only {
    display: block !important;
}

.auth-page.facebook-registration-mode .terms,
.auth-page.facebook-registration-mode .register-footer {
    display: flex !important;
}

.auth-page.facebook-registration-mode .input-group.facebook-hidden-field,
.auth-page.facebook-registration-mode .login-only,
.auth-page.facebook-registration-mode .login-footer,
.auth-page.facebook-registration-mode .social-login,
.auth-page.facebook-registration-mode .divider {
    display: none !important;
}