* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

:root {
    --linear-grad: linear-gradient(to right, #141e30, #243b55);
    --grad-clr1: #141e30;
    --grad-clr2: #243b55;
}

body {
    height: 100vh;

    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    display: grid;
    place-content: center;
    font-family: "Poppins", sans-serif;
    color: #0b1c2f;

}
/**/

.container {
    position: relative;
    width: 850px;
    height: 650px;
    background-color: #ffffff;
    box-shadow: 0 20px 80px rgba(0.3, 0.3, 0.3, 0.3);
    border-radius: 13px;
    overflow: hidden;
}

.form-container {
    position: absolute;
    width: 60%;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.6s ease-in-out;
}

.container .sign-in-container {
    opacity: 1;
    z-index: 5;
}

.container .sign-up-container {
    opacity: 0;
    z-index: 1;
}

form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #243b55;
    font-weight: 700;
    margin-top: 30px;
    padding: 20px;
}
.sign-up-container h1{
    margin-top: 80px;
}

.social-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
/* Đảm bảo hộp nhập mật khẩu có padding đúng */
.infield.password {
    position: relative;  /* Giúp định vị biểu tượng con mắt bên trong ô input */
}

.infield.password input {
    width: 100%;
    padding: 15px 40px 15px 20px;
    background-color: #fff;
    border: 2px solid #1e3047;
    border-radius: 5px;
    outline: none;
    font-size: 16px;
    transition: border-color 0.3s;
}


.infield.password .toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #243b55;
    transition: color 0.3s;
}

/* Thay đổi màu khi hover */
.infield.password .toggle-password:hover {
    color: #1e3047;
}




.social-container a {
    border: 1px solid #dddddd;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 5px;
    height: 40px;
    width: 40px;
    color: #333;
    transition: all 0.5s ease;
}

.social-container a:hover {
    color: #f6f5f7;
    background: #20344c;
}

span {
    font-size: 13px;
    margin-bottom: 10px;
}
.forgot:hover {
    color: #243a54;
    font-weight: bold;
}
.infield {
    position: relative;
    margin: 20px 0;
    width: 90%;
}

input {
    width: 100%;
    padding: 15px 20px;
    background-color: #fff;
    border: 2px solid #1e3047;
    border-radius: 5px;
    outline: none;
    font-size: 16px;
    transition: border-color 0.3s;
}

.sign-up-container .infield .input {
    width: 100%;
    padding: 10px 15px;
    background-color: #fff;
    border: 2px solid #1e3047;
    border-radius: 5px;
    outline: none;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus {
    border-color: #1e3047;
}

label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #1e3047;
    pointer-events: none;
    transition: all 0.3s;
    background-color: #ffffff;
    padding: 0 5px;
}

input:focus + label,
input:not(:placeholder-shown) + label {
    top: 0px;
    left: 20px;
    font-size: 13px;
    color: #1e3047;
}

a {
    color: #243b55;
    font-size: 14px;
    text-decoration: none;
    margin: 15px 0;
    transition: color 0.3s ease;
}

button {
    border-radius: 30px;
    background: var(--linear-grad);
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    padding: 12px 45px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.6s ease;
    border: 2px solid #243b55;
    margin-top: 15px;
}

button:hover {
    background: #ffffff;
    color: var(--grad-clr1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

button.ghost {
    background: transparent;
    border: 2px solid #ffffff;
}


.back-home-link {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
}

.back-home-link:hover {
    color: #1a2e4a;
    text-decoration: underline;
}
.overlay-container {
    position: absolute;
    top: 0;
    left: 60%;
    width: 40%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}
#overlayBtn:hover {
    background-color: #243b55;
    color: var(--grad-clr1);
}

.overlay {
    position: relative;
    background: var(--linear-grad);
    color: #ffffff;
    left: -150%;
    height: 100%;
    width: 250%;
    transition: transform 0.6s ease-in-out;
    transform: translateX(0);
}

.overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
            to top,
            rgba(46, 94, 109, 0.4) 40%,
            rgba(46, 94, 109, 0)
    );
}

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    height: 100%;
    width: 340px;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.overlay-left {
    right: 60%;
    transform: translateX(-12%);
}

.overlay-right {
    right: 0;
    transform: translateX(0%);
}

p {
    font-size: 14px;
    font-weight: 300;
    line-height: 20px;
    letter-spacing: 0.5px;
    margin: 25px 0 35px;
}

.overlay-panel h1 {
    color: #eeeeee;
}
.overlay-panel button {
    background-color: transparent;
    border: 2px solid #ffffff;
    padding: 10px 35px;
    transition: all 0.3s ease;
}

.overlay-panel button:hover {
    background-color: #ffffff;
    color: #243b55;
}

.right-panel-active .overlay-container {
    transform: translateX(-150%);
}
.container.right-panel-active .overlay {
    transform: translateX(50%);
}
.right-panel-active .overlay-left {
    transform: translateX(25%);
}
.right-panel-active .overlay-right {
    transform: translateX(35%);
}

.container.right-panel-active .sign-in-container {
    transform: translateX(100%);
    opacity: 0;
    z-index: 1;
}
.container.right-panel-active .sign-up-container {
    transform: translateX(66%);
    opacity: 1;
    z-index: 5;
}
@keyframes show {
    0%,
    50% {
        opacity: 0;
        z-index: 1;
    }
    50.1%,
    100% {
        opacity: 1;
        z-index: 5;
    }
}
.sign-up-container {
    overflow-y: auto;
    height: 100%;
    padding-top: 210px;
    padding-right: 20px;
    padding-bottom: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.infield.terms {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.infield.terms input[type="checkbox"] {
    margin-right: 20px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.infield.terms input[type="checkbox"]:checked {
    background-color: #243b55;
    border-color: #243b55;
    position: relative;
}

.infield.terms label {
    font-size: 11.5px;
    color: #243b55;
    cursor: pointer;
    line-height: 1.5;
    padding-top: 12px;
}


.infield.terms input[type="checkbox"]:checked + label {
    font-weight: 600;
}


.remember-forgot-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 5px 21px;
}

.infield.remember-me {
    display: flex;
    align-items: center;
}

.infield.remember-me input[type="checkbox"] {
    margin-right: 8px;
    vertical-align: middle;
    width: 16px;
    height: 16px;
    cursor: pointer;

}

.infield.remember-me label {
    font-size: 12px;
    color: #243b55;
    cursor: pointer;
    padding-top: 15px;
}
.infield.remember-me input[type="checkbox"]:checked + label {
    font-weight: 600;
}

a.forgot {
    font-size: 12px;
    text-decoration: none;
    color: #243b55;
    transition: color 0.3s ease;
    width: 100%;
    text-align: end;
}

a.forgot:hover {
    color: #1e3047;
    font-weight: 500;
}


::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background-color: #243b55;  /
border-radius: 10px;
}

.required {
    color: red;
    font-size: 1.2em;
    margin-left: 5px;
}
.error {
    color: red;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}