@import url('https://fonts.googleapis.com/css?family=Montserrat:400,800');

.auth-page * {
    box-sizing: border-box;
}

.auth-page body {
    background: #f6f5f7;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: 'Montserrat', sans-serif;
    height: 100vh;
    margin: -20px 0 50px;
}

.auth-page h1 {
    font-weight: bold;
    margin: 0;
}

.auth-page h2 {
    text-align: center;
}

.auth-page p {
    font-size: 14px;
    font-weight: 100;
    line-height: 20px;
    letter-spacing: 0.5px;
    margin: 20px 0 30px;
}

.auth-page span {
    font-size: 12px;
}

.auth-page a {
    color: #333;
    font-size: 14px;
    text-decoration: none;
    margin: 15px 0;
}

.authMain {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 100vh;
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
}

.auth-page button {
    border-radius: 20px;
    border: 1px solid #20224a;
    background-color: #4d52d1;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: bold;
    padding: 12px 45px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 80ms ease-in;
}

.auth-page button:active {
    transform: scale(0.95);
}

.auth-page button:focus {
    outline: none;
}

.auth-page button.ghost {
    background-color: transparent;
    border-color: #FFFFFF;
}

.auth-page form {
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    height: 100%;
    text-align: center;
}

.auth-page input {
    background-color: #eee;
    border: none;
    padding: 12px 15px;
    margin: 8px 0;
    width: 100%;
}

.auth-page .auth-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
    position: relative;
    overflow: hidden;
    width: 1024px;
    max-width: 100%;
    min-height: 480px;
}

.auth-page .auth-form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.auth-page .auth-sign-in-container {
    left: 0;
    width: 50%;
    z-index: 2;
}

.auth-page .auth-container.right-panel-active .auth-sign-in-container {
    transform: translateX(100%);
}

.auth-page .auth-sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.auth-page .auth-container.right-panel-active .auth-sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: show 0.6s;
}

.auth-page

@keyframes show {
    0%, 49.99% {
        opacity: 0;
        z-index: 1;
    }
    50%, 100% {
        opacity: 1;
        z-index: 5;
    }
}

.auth-page .auth-overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.auth-page .auth-container.right-panel-active .auth-overlay-container {
    transform: translateX(-100%);
}
 
.auth-page .auth-overlay {

    background: linear-gradient(to right, #4d52d1, #323578);
    background-repeat: no-repeat;
    background-size: cover;
    color: #FFFFFF;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.auth-page .auth-container.right-panel-active .auth-overlay {
    transform: translateX(50%);
}

.auth-page .auth-overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.auth-page .auth-overlay-left {
    transform: translateX(-20%);
}

.auth-page .auth-container.right-panel-active .auth-overlay-left {
    transform: translateX(0);
}

.auth-page .auth-overlay-right {
    right: 0;
    transform: translateX(0);
}

.auth-page .auth-container.right-panel-active .auth-overlay-right {
    transform: translateX(20%);
}

.auth-page .social-container {
    margin: 20px 0;
}

.auth-page .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;
}

@media (max-width: 1040px) {
    .auth-page .auth-container {
        width: 100%;
        max-width: 100%;
        min-height: 400px; /* Фиксированная высота */
        margin-top: 60px; /* Для кнопок переключения */
    }

    /* Показываем/скрываем формы */
    .auth-form-container.mobile-active {
        display: flex !important;
        opacity: 1 !important;
    }

    .auth-form-container.mobile-hidden {
        display: none !important;
    }

    /* Кнопки переключения */
    .auth-toggle-mobile {
        display: flex;
        position: absolute;
        top: 10px;
        width: 100%;
        justify-content: center;
        gap: 10px;
        z-index: 100;
    }

    .auth-toggle-mobile button {
        padding: 10px 20px;
        background: #f0f0f0;
        border: none;
        border-radius: 20px;
    }

    .auth-toggle-mobile button.active {
        background: #4d52d1; 
        color: white;
    }

    /* Делаем формы полноразмерными */
    .auth-form-container {
        width: 100% !important;
        left: 0 !important;
        padding: 20px !important;
    }

    /* Скрываем overlay */
    .auth-overlay-container {
        display: none !important;
    }
}

/* Дополнительно для очень маленьких экранов */
@media (max-width: 1040px) {
    .auth-page .authMain {
        width: 100%;
        padding: 10px;
    }

    .auth-page .auth-container {
        min-height: 380px;
        margin-top: 50px;
    }

    .auth-toggle-mobile {
        top: 5px;
        gap: 5px;
        padding: 0 10px;
    }

    .auth-toggle-mobile button {
        padding: 10px 5px !important;
        font-size: 12px !important;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
    }

    .auth-page form {
        padding: 0 15px !important;
        width: 100%;
    }

    .auth-page input {
        padding: 12px 10px !important;
        font-size: 14px;
        width: 100% !important;
        max-width: 100%;
    }

    .auth-page button[type="submit"] {
        width: 100%;
        padding: 12px !important;
        margin-top: 10px;
    }

    .auth-page h1 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .auth-form-container {
        padding: 15px 5px !important;
    }
}

/* Для экстремально маленьких экранов */
@media (max-width: 320px) {
    .auth-toggle-mobile button {
        font-size: 11px !important;
        padding: 8px 3px !important;
    }

    .auth-page input {
        padding: 10px 8px !important;
    }

    .auth-page h1 {
        font-size: 1.3rem;
    }
}