/* login_style.css */

:root {
    --accent-neon: #D7FD51;
    --accent-dark: #b5d930;
    --bg-dark: #121212;
    --bg-panel: #1e1e1e;
    --text-main: #242424;
    --text-muted: #777777;
    --bg-white: #ffffff;
    --border-light: #f2f2f2;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.full-screen-bg {
    position: fixed; /* Фиксируем на весь экран */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Сначала градиент (верхний слой), потом картинка (нижний слой) */
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.2)),
                url('/static/images/background_pic/background.jpg') no-repeat center center;
    background-size: cover;
    z-index: -1; /* Уводим в самый низ, под хедер и форму */
}

/* Обертка для центрирования карточки */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 100px 20px 40px; /* 100px сверху, чтобы не залезть под хедер */
}

/* САМА КАРТОЧКА (Узкая) */
.auth-card {
    background-color: var(--bg-white);
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
    width: 850px;
    max-width: 100%;
    min-height: 550px;
}

/* ФОРМЫ */
form {
    background-color: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    height: 100%;
    text-align: center;
}

h1 { font-weight: 900; margin: 0; letter-spacing: -1px; font-size: 2rem; color: var(--text-main); }
span { font-size: 12px; color: var(--text-muted); margin: 10px 0; }

.header-logo span {
    font-size: inherit;      /* Наследует размер 24px от родителя .header-logo */
    color: var(--accent-dark);
    margin: 0;               /* Сбрасываем отступ 10px от обычных span */
    font-weight: 900;
    display: inline;         /* Гарантируем, что он в одну строку с FIT */
}

/* Сам текст логотипа */
.header-logo {
    font-size: 24px;         /* Устанавливаем размер здесь */
    font-weight: 900;
    text-decoration: none;
    color: #000;
    display: flex;           /* Чтобы FIT и APP всегда были на одной линии */
    align-items: center;
}

input {
    background-color: var(--border-light);
    border: 2px solid transparent;
    padding: 14px 15px;
    margin: 8px 0;
    width: 100%;
    border-radius: 12px;
    font-family: inherit;
    transition: 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--accent-neon);
    background-color: #fff;
}

button {
    border-radius: 50px;
    border: none;
    background-color: var(--accent-neon);
    color: #000;
    font-size: 14px;
    font-weight: 700;
    padding: 14px 45px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 15px;
}

button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(215, 253, 81, 0.2); }

button.ghost {
    background-color: transparent;
    border: 2px solid var(--accent-neon);
    color: var(--accent-neon);
}

button.ghost:hover {
    background-color: var(--accent-neon);
    color: #000;
}

/* ДЕСТОПНАЯ АНИМАЦИЯ */
.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in-container { left: 0; width: 50%; z-index: 2; }
.auth-card.right-panel-active .sign-in-container { transform: translateX(100%); opacity: 0; }

.sign-up-container { left: 0; width: 50%; opacity: 0; z-index: 1; }
.auth-card.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: show 0.6s;
}

@keyframes show {
    0%, 49.99% { opacity: 0; z-index: 1; }
    50%, 100% { opacity: 1; z-index: 5; }
}

/* ОВЕРЛЕЙ */
.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-card.right-panel-active .overlay-container { transform: translateX(-100%); }

.overlay {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-panel) 100%);
    color: #fff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.auth-card.right-panel-active .overlay { transform: translateX(50%); }

.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;
}

.overlay-left { transform: translateX(-20%); }
.auth-card.right-panel-active .overlay-left { transform: translateX(0); }

.overlay-right { right: 0; transform: translateX(0); }
.auth-card.right-panel-active .overlay-right { transform: translateX(20%); }

.overlay-panel h1 {
    font-weight: 900;
    font-size: 2.5rem; /* Увеличиваем размер */
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5); /* Добавляем тень для контраста */
    letter-spacing: -1px;
    color: #ffffff; /* Явно задаем белый цвет */
    line-height: 1.2;
}

.overlay-panel p {
    font-size: 1.1rem; /* Увеличиваем описание */
    font-weight: 500;
    opacity: 0.95; /* Делаем почти непрозрачным */
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
    max-width: 280px;
    margin: 0 auto 25px;
    color: #ffffff;
}

/* МОБИЛЬНАЯ ВЕРСИЯ */
@media (max-width: 768px) {
    /* 1. Карточка должна быть по центру и не шире экрана */
    .auth-card {
        width: 95% !important;
        max-width: 400px; /* Оптимально для телефона */
        min-height: 520px;
        margin: 0 auto;
        overflow: hidden; /* Чтобы ничего не вылезало за края */
    }

    .overlay-container { display: none !important; }

    /* 2. Обе формы ставим в одну позицию (друг на друга) */
    .form-container {
        width: 100% !important;
        left: 0 !important;
        top: 0 !important;
        height: 100% !important;
        transform: none !important; /* УБИРАЕМ СДВИГ ВПРАВО */
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
    }

    /* 3. Показываем Вход (по умолчанию) */
    .sign-in-container {
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 5;
    }

    /* 4. Показываем Регистрацию (только при активном классе) */
    .auth-card.right-panel-active .sign-up-container {
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 10;
        transform: none !important; /* Гарантируем отсутствие сдвига */
        left: 0 !important;
    }

    /* Скрываем вход, когда активна регистрация */
    .auth-card.right-panel-active .sign-in-container {
        opacity: 0 !important;
        visibility: hidden !important;
    }


    /* Стили для кнопок переключения */
    .mobile-switch {
        display: block !important;
        margin: 15px 0;
        text-align: center;
        color: #888;
    }
}
.social-container { margin: 15px 0; }
.social-container a {
    border: 1px solid var(--border-light);
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 5px;
    height: 40px;
    width: 40px;
    color: var(--text-main);
    transition: 0.3s;
}

.social-container a:hover { background: var(--border-light); }
.error-msg { color: #ff4d4d; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.forgot-pass { font-size: 13px; margin: 10px 0; color: var(--text-muted); }