@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* Scoped Body Styles for Auth Pages (and any page when not logged in) */
body#index {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(-40deg, #e0f7ff, #00aeff, #001c58, #008682);
    /* background-image: url('../images/wallpaper SIDOARJO2.jpg'); */
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    font-family: 'Poppins', sans-serif;
    margin: 0;
}

/* Hide Sidebar/Topbar on Auth Pages */
body#index #topbar,
body#index #sidebar,
body#index .mobile-bottom-nav {
    display: none !important;
}

body#index #page-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

body#index #main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

body#index #page-content {
    width: 100%;
    display: flex;
    justify-content: center;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.login-container {
    position: relative;
    width: 850px;
    height: 550px;
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 0 30px rgba(0, 0, 0, .2);
    margin: 20px;
    overflow: hidden;
}

.form-box {
    position: absolute;
    right: 0;
    width: 50%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    color: #333;
    text-align: center;
    padding: 40px;
    z-index: 1;
    transition: .6s ease-in-out 1.2s, visibility 0s 1s;
    overflow-y: auto;
    scrollbar-width: thin;
}

.form-box::-webkit-scrollbar {
    width: 6px;
}

.form-box::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.login-container.active .form-box {
    right: 50%;
}

.login-container.active .form-box.register {
    visibility: visible;
}

.form-box.register {
    visibility: hidden;
}

.form-box form {
    width: 100%;
    margin: auto;
}

.login-container h1 {
    font-size: 36px;
    margin: -10px 0;
}

.input-box {
    position: relative;
    margin: 30px 0;
}

.input-box input,
.input-box select,
.input-box textarea {
    width: 100%;
    padding: 13px 50px 13px 20px;
    background: #eee;
    border-radius: 8px;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.input-box input::placeholder {
    color: #888;
    font-weight: 400;
}

.input-box input:focus,
.input-box select:focus,
.input-box textarea:focus {
    outline: 2px solid #00B4D8;
    box-shadow: 0 0 5px rgba(0, 180, 216, 0.5);
    transition: .1s;
}

/* Icon replacement - using FontAwesome instead of Boxicons */
.input-box i.fa {
    color: #888;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

.forgot-link {
    margin: -15px 0 15px;
}

.forgot-link a {
    font-size: 14.5px;
    color: #333;
    text-decoration: none;
}

.btn-auth {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #00B4D8, #0096C7);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 180, 216, 0.3);
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.btn-auth:hover {
    background: linear-gradient(135deg, #0096C7, #0078A0);
    box-shadow: 0 8px 20px rgba(0, 180, 216, 0.4);
    transform: translateY(-2px);
}

.login-container p {
    font-size: 14.5px;
    margin: 15px 0;
}

.social-icons {
    display: flex;
    justify-content: center;
}

.social-icons a {
    display: inline-flex;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 24px;
    color: #333;
    text-decoration: none;
    margin: 0 8px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    transform: scale(1.2);
    color: #fff;
}

.social-icons a.google:hover {
    background: #db4437;
    border-color: #db4437;
}

.social-icons a.facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
}

.social-icons a.github:hover {
    background: #333;
    border-color: #333;
}

.social-icons a.linkedin:hover {
    background: #0a66c2;
    border-color: #0a66c2;
}

.toggle-box {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Added to clip the ::before circle */
    top: 0;
    left: 0;
    /* Ensuring placement */
}

.toggle-box::before {
    content: '';
    left: -250%;
    /* Initial state for Login view */
    border-radius: 150px;
    position: absolute;
    width: 300%;
    height: 100%;
    background: linear-gradient(135deg, #00B4D8, #004258);
    z-index: 2;
    transition: 1.8s ease-in-out;
}

.login-container.active .toggle-box::before {
    left: 50%;
    /* Slides to cover left side for Register view */
}

.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    color: #fff;
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
    z-index: 2;
    /* Must be above the ::before background? No, z-index 2 is same. */
    transition: .6s ease-in-out;
}

/* Ensure panels are on top of the pseudo-element background (z-index 2) */
/* Actually in reference, both are z-index 2.
   The panel text needs to be visible. */

/* Re-implementing EXACT reference logic for toggle panels */
.toggle-panel.toggle-left {
    left: 0;
    transition-delay: 1.2s;
}

.login-container.active .toggle-panel.toggle-left {
    left: -50%;
    transition-delay: .6s;
}

.toggle-panel.toggle-right {
    right: -50%;
    transition-delay: .6s;
}

.login-container.active .toggle-panel.toggle-right {
    right: 0;
    transition-delay: 1.2s;
}

.toggle-panel p {
    margin-bottom: 20px;
}

.toggle-panel .btn-auth {
    width: 160px;
    height: 46px;
    background: transparent;
    border: 2px solid #fff;
    box-shadow: none;
}

/* Mobile Responsiveness */
@media screen and (max-width: 650px) {
    .login-container {
        height: calc(100vh - 40px);
        width: 100%;
    }

    .form-box {
        bottom: 0;
        width: 100%;
        height: 70%;
        right: 0;
        top: auto;
        /* Padding change? Global is 40px. Mobile was 20px. */
        padding: 20px;
        /* Keep this */
    }

    .form-box form {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .login-container.active .form-box {
        right: 0;
        bottom: 30%;
    }

    .toggle-box::before {
        left: 0;
        top: -270%;
        width: 100%;
        height: 300%;
        border-radius: 20vw;
    }

    .login-container.active .toggle-box::before {
        left: 0;
        top: 70%;
    }

    .toggle-panel {
        width: 100%;
        height: 30%;
    }

    .toggle-panel.toggle-left {
        top: 0;
    }

    .login-container.active .toggle-panel.toggle-left {
        left: 0;
        top: -30%;
    }

    .toggle-panel.toggle-right {
        right: 0;
        bottom: -30%;
    }

    .login-container.active .toggle-panel.toggle-right {
        bottom: 0;
    }

    .form-box {
        padding: 20px;
    }

    .toggle-panel h1 {
        font-size: 30px;
    }
}

}