﻿@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800&display=swap");

:root {
    --poppins: 'Poppins', sans-serif;
    --lato: 'Lato', sans-serif;
    --light: #F9F9F9;
    --blue: #3C91E6;
    --light-blue: #CFE8FF;
    --grey: #eee;
    --dark-grey: #AAAAAA;
    --dark: #151111;
    --red: #DB504A;
    --light-red: #ff726f;
    --yellow: #FFCE26;
    --light-yellow: #FFF2C6;
    --orange: #ff8c6b;
    --light-orange: #FFE0D3;
    --purple: #800080;
    --light-purple: #9370DB;
    --indigo: #134e5e;
    --skin: papayawhip;
    --tiffany: #B0EDCE;
    --light-tiffany: #F0FFF0;
    --cadetblue: cadetblue;
    --brown: saddlebrown;
}

*,
*::before,
*::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body,
input {
    font-family: "Poppins", sans-serif;
}

main {
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background-color: var(--tiffany);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-overlay-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10500;
}

.invalid {
    border: 1px solid red !important;
    border-radius: 10px;
}

    .invalid i {
        color: red;
    }

.box {
    position: relative;
    width: 100%;
    max-width: 1020px;
    height: 640px;
    background-color: var(--skin);
    border-radius: 3.3rem;
    box-shadow: 0 60px 40px -30px rgba(0, 0, 0, 0.27);
}

.inner-box {
    position: absolute;
    width: calc(100% - 4.1rem);
    height: calc(100% - 4.1rem);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forms-wrap {
    position: absolute;
    height: 100%;
    width: 45%;
    top: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    transition: 0.8s ease-in-out;
}

form {
    max-width: 260px;
    width: 100%;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    transition: opacity 0.02s 0.4s;
}

    form.forget-form {
        opacity: 0;
        pointer-events: none;
    }

.logo {
    display: flex;
    align-items: center;
}

    .logo img {
        width: 27px;
        margin-right: 0.3rem;
    }

    .logo h4 {
        font-size: 1.1rem;
        letter-spacing: -0.5px;
        color: var(--dark);
        font-style: italic;
    }

.heading h2 {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--dark);
}

.heading a {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--light-red);
}

.heading h6 {
    color: var(--dark-grey);
    font-weight: 400;
    font-size: 0.75rem;
    display: inline;
}

.heading h4 {
    color: var(--brown);
    font-weight: 600;
    font-size: 1.5rem;
    display: inline;
}

.footer a {
    font-size: 0.8rem;
    font-weight: 900;
    color: var(--dark);
    float: right;
}

.footer h6 {
    color: var(--dark-grey);
    font-weight: 400;
    font-size: 0.8rem;
    float: right;
}

.toggle {
    color: var(--dark);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: 0.3s;
}

    .toggle:hover {
        color: var(--cadetblue);
    }

.input-wrap {
    position: relative;
    height: 37px;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--dark-grey);
}

    .input-wrap i {
        position: absolute;
        top: .6rem;
        left: .6rem;
        color: var(--dark-grey);
        transition: .8s;
    }

.input-field {
    position: absolute;
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    outline: none;
    padding: 0 4.2rem 0 0;
    left: 37px;
    font-size: 0.95rem;
    color: var(--dark);
    transition: 0.4s;
}

    .input-field:focus ~ i {
        color: var(--cadetblue);
        transition: .8s;
    }

    .input-field::placeholder {
        font-size: 1rem;
        font-weight: 600;
        color: var(--dark-grey);
    }

    .input-field.active {
        border-bottom-color: var(--dark);
    }

        .input-field.active + label {
            font-size: 0.75rem;
            top: -2px;
        }

.caps-warning {
    display: none;
    left: auto !important;
    right: -1.5rem;
    font-size: 1.2rem;
    margin-top: 2px;
}

.toggle-password {
    right: 0;
    left: auto !important;
    font-size: 1.2rem;
    cursor: pointer;
}

.sign-btn {
    display: inline-block;
    width: 100%;
    height: 43px;
    background-color: var(--dark);
    color: var(--light);
    border: none;
    cursor: pointer;
    border-radius: 0.8rem;
    margin-bottom: 2rem;
    padding-top: 0.4rem;
    transition: 0.3s;
    text-align: center;
    font-size: 1.2rem;
    text-decoration: none;
}

    .sign-btn:hover {
        background-color: var(--cadetblue);
    }

.text {
    color: var(--dark-grey);
    font-size: 0.7rem;
}

    .text a {
        color: var(--dark-grey);
        transition: 0.3s;
    }

        .text a:hover {
            color: var(--cadetblue);
        }

main.sign-up-mode form.sign-in-form {
    opacity: 0;
    pointer-events: none;
}

main.sign-up-mode form.forget-form {
    opacity: 1;
    pointer-events: all;
}

main.sign-up-mode .forms-wrap {
    left: 55%;
}

main.sign-up-mode .carousel {
    left: 0%;
}

.carousel {
    position: absolute;
    height: 100%;
    width: 55%;
    left: 45%;
    top: 0;
    background-color: var(--light-tiffany);
    border-radius: 2rem;
    display: grid;
    grid-template-rows: auto 1fr;
    padding-bottom: 2rem;
    overflow: hidden;
    transition: 0.8s ease-in-out;
}

.images-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.image {
    width: 100%;
    height: 450px;
    grid-column: 1/2;
    grid-row: 1/2;
    opacity: 0;
    transition: opacity 0.3s, transform 0.5s;
}

.img-1 {
    transform: translate(0, -50px);
}

.img-2 {
    transform: scale(0.4, 0.5);
}

.img-3 {
    transform: scale(0.3) rotate(-20deg);
}

.image.show {
    opacity: 1;
    transform: none;
}

.text-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.text-wrap {
    max-height: 2.2rem;
    overflow: hidden;
    margin-bottom: 0rem;
}

.text-group {
    display: flex;
    flex-direction: column;
    text-align: center;
    transform: translateY(0);
    transition: 0.5s;
}

    .text-group h2 {
        line-height: 3rem;
        font-weight: 600;
        font-size: 1.6rem;
    }

.bullets {
    display: flex;
    align-items: center;
    justify-content: center;
}

    .bullets span {
        display: block;
        width: 0.5rem;
        height: 0.5rem;
        background-color: var(--dark-grey);
        margin: 0 0.25rem;
        border-radius: 50%;
        cursor: pointer;
        transition: 0.3s;
    }

        .bullets span.active {
            width: 1.1rem;
            background-color: var(--dark);
            border-radius: 1rem;
        }

@media (max-width: 850px) {
    .box {
        min-height: 550px;
        height: auto;
        max-width: 550px;
        overflow: hidden;
    }

    .inner-box {
        position: static;
        transform: none;
        width: revert;
        height: revert;
        padding: 2rem;
    }

    .forms-wrap {
        position: revert;
        width: 100%;
        height: auto;
    }

    form {
        max-width: revert;
        padding: 1.5rem 2.5rem 2rem;
        transition: transform 0.8s ease-in-out, opacity 0.45s linear;
    }

    .heading {
        margin: 2rem 0;
    }

    form.forget-form {
        transform: translateX(100%);
    }

    main.sign-up-mode form.sign-in-form {
        transform: translateX(-100%);
    }

    main.sign-up-mode form.forget-form {
        transform: translateX(0%);
    }

    .carousel {
        position: revert;
        height: auto;
        width: 100%;
        padding: 3rem 2rem;
        display: flex;
    }

    .images-wrapper {
        display: none;
    }

    .text-slider {
        width: 100%;
    }
}

@media (max-width: 530px) {
    main {
        padding: 1rem;
    }

    .box {
        border-radius: 2rem;
    }

    .inner-box {
        padding: 1rem;
    }

    .carousel {
        padding: 1.5rem 1rem;
        border-radius: 1.6rem;
    }

    .text-wrap {
        margin-bottom: 1rem;
    }

    .text-group h2 {
        font-size: 1.2rem;
    }

    form {
        padding: 1rem 2rem 1.5rem;
    }
}

/* Loading */
.loading-overlay-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(5px); /* 背景模糊 */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8); /* 半透明白色背景 */
    z-index: 10500;
}

.loading-image {
    width: 220px; /* 圖片大小，可根據需要調整 */
    height: 220px;
}