* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

@font-face {
    font-family: "Colak";
    src: url("../fonts/Colak.ttf");
}

@font-face {
    font-family: "IRANYekanX Medium";
    src: url("../fonts/IRANYekanX-Medium.ttf");
}

:root {
    --color1: #27408e;
    --color2: #304faf;
    --color3: #536cb5;
    --color4: #7688bb;
    --color5: #98a5c0;
    --color6: #c0c6cb;
    --red-color1: #ba1212;
    --red-color2: #b05050;
    --green-color1: #3eb489;
    --green-color2: #90ee90;
    --primary-color: #4bb59e;
    --secondary-color: #f9d7d8;
    --tertiary--color: #f2cca5;
    --border--color: #dc9863;
}

.main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* background: linear-gradient(135deg, var(--color2) 0%, var(--color4) 100%); */
    background-image: url("../images/bg.jpg");
    background-position: center;
    background-repeat: repeat;
    background-size: contain;
    font-family: "IRANYekanX Medium", sans-serif;
    position: relative;
    overflow: hidden;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        var(--red-color1) 0%,
        var(--red-color2) 100%
    );
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    z-index: 1;
}

.bg-overlay-green {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        var(--green-color1) 0%,
        var(--green-color2) 100%
    );
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    z-index: 1;
}

.main.error-bg .bg-overlay {
    opacity: 0.8;
}

.main.error-bg h2 {
    opacity: 0;
}

.main.success-bg .bg-overlay-green {
    opacity: 0.8;
}

.main.success-bg h2 {
    opacity: 0;
}

.container {
    position: relative;
    width: 100%;
    overflow: visible;
    z-index: 2;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-container {
    position: relative;
    transition: 0.6s ease-in-out;
}

.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 40vh;
    height: fit-content;
    width: 100%;
}

.signup-container {
    position: absolute;
    top: -15%;
    left: 100%;
    width: 100%;
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 40vh;
    height: fit-content;
    width: 100%;
}

.container.active .signup-container {
    transform: translateX(-100%);
    opacity: 1;
}

.container.active .login-container {
    transform: translateX(-100%);
    opacity: 0;
}

body h2 {
    font-family: Colak, sans-serif;
    font-size: 78px;
    text-align: center;
    color: var(--primary-color);
    /* text-shadow: 0 20px 20px rgba(0, 0, 0, 0.3); */
    text-shadow: 0 0 20px var(--secondary-color);
    transition: 0.3s ease;
}

.login-form,
.signup-form {
    background: #eeeeee;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    height: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.signup-form {
    width: 450px;
}

.signup-details {
    opacity: 0.5;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.form-group {
    flex: 0 0 45%;
    box-sizing: border-box;
    margin-bottom: 10px;
    position: relative;
}

.form-group.verification-code {
    display: flex;
    justify-content: center;
    flex: 0 0 100%;
    margin-bottom: 20px;
}

.signup-container .form-group.verification-code input {
    width: 60%;
}

.form-group.email {
    display: flex;
    justify-content: center;
    flex: 0 0 100%;
}

.signup-container .form-group.email input {
    width: 60%;
}

.form-group span {
    position: absolute;
    right: 20%;
    top: -25%;
    padding: 15px 0;
    pointer-events: none;
    transition: 0.5s ease;
    font-size: 14px;
}

.form-group.email span {
    right: 122px;
}

.form-group.verification-code span {
    right: 80px;
}

input {
    font-family: "IRANYekanX Medium", sans-serif;
    background-color: #eeeeee;
    width: 100%;
    padding: 12px 25px 2px 15px;
    border: none;
    /* border-radius: 8px; */
    font-size: 14px;
    border-bottom: 1px solid #666;
    outline: none;
}

.login-container input {
    padding-right: 35px;
}

.login-container span {
    right: 35px;
}

.signup-container input {
    padding-right: 35px;
}

.signup-container span {
    right: 35px;
}

.signup-container .form-group.verification-code input {
    padding-right: 35px;
}

.signup-container .form-group.email input {
    padding-right: 45px;
}

input:focus ~ span,
input:not(:placeholder-shown) ~ span {
    color: var(--primary-color);
    transform: translateY(-20px);
}

input:focus ~ i,
input:not(:placeholder-shown) ~ i {
    color: var(--primary-color);
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 88%;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    z-index: 2;
}

.input-icon {
    position: absolute;
    right: 5%;
    top: 50%;
    pointer-events: none;
    transform: translateY(-50%);
    color: #666;
}

.form-group.email .input-icon,
.form-group.verification-code .input-icon {
    right: 25%;
}

button {
    font-family: "IRANYekanX Medium", sans-serif;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s ease;
}

.signup-container button {
    width: 60%;
}

button:hover {
    transform: scale(1.05);
}

.signup-container button:disabled {
    background: #aaa;
    cursor: initial;
}

.signup-container button:disabled:hover {
    transform: none;
}

.switch-form {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.switch-form button {
    display: flex;
    background: none;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0;
    width: auto;
    margin-top: 30px;
    gap: 15px;
}

.switch-form button i {
    margin-top: 5px;
}

.switch-form button:hover {
    transform: none;
}

.verified .signup-details {
    display: block;
}

footer {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    bottom: 15px;
}

footer .copyright {
    font-size: 12px;
}

footer .developer {
    font-size: 10px;
}

@media (max-width: 480px) {
    .container {
        width: 90%;
        padding: 20px;
    }
}
