.auth-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.auth-fullscreen-overlay.show {
    display: flex;
}

.auth-fullscreen-modal {
    width: 100vw;
    height: 100vh;
    display: flex;
    background: white;
    overflow: hidden;
    position: relative;
}

/* Кнопка закрытия */
.auth-global-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 24px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s ease;
    z-index: 20;
}

.auth-global-close:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Левая панель */
.auth-left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 40px;
    background: white;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

/* Экраны */
.auth-screen {
    display: none;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.auth-screen.active {
    display: block;
}

.auth-title {
    font-size: 36px;
    font-weight: 600;
    color: #0d0d0d;
    margin-bottom: 8px;
    line-height: 1.2;
}

.auth-subtitle {
    font-size: 16px;
    color: rgba(13, 13, 13, 0.58);
    margin-bottom: 32px;
}

/* Соц-кнопки */
.auth-social-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    border: 1px solid rgba(13, 13, 13, 0.12);
    background: white;
    font-size: 16px;
    font-weight: 500;
    color: #0d0d0d;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.1s ease, border-color 0.1s ease;
}

.auth-social-btn i {
    font-size: 24px;
}

.auth-social-btn.telegram i { color: #0088cc; }
.auth-social-btn.yandex i { color: #ff0000; }
.auth-social-btn.vk i { color: #4a76a8; }

.auth-social-btn:hover {
    background: rgba(13, 13, 13, 0.03);
    border-color: rgba(13, 13, 13, 0.2);
}

/* Разделитель */
.auth-divider {
    text-align: center;
    position: relative;
    margin: 24px 0;
    color: rgba(13, 13, 13, 0.4);
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 30px);
    height: 1px;
    background: rgba(13, 13, 13, 0.06);
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* Кнопка "Войти через почту" */
.auth-email-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    border: 1px solid #0a7cff;
    background: transparent;
    font-size: 16px;
    font-weight: 500;
    color: #0a7cff;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.1s ease, color 0.1s ease;
}

.auth-email-btn i {
    font-size: 20px;
}

.auth-email-btn:hover {
    background: #0a7cff;
    color: white;
}

/* Табы */
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 1px solid rgba(13, 13, 13, 0.06);
    padding-bottom: 8px;
}

.auth-tab {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 18px;
    font-weight: 500;
    color: rgba(13, 13, 13, 0.4);
    cursor: pointer;
    position: relative;
    transition: color 0.1s ease;
}

.auth-tab.active {
    color: #0a7cff;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 0;
    right: 0;
    height: 2px;
    background: #0a7cff;
}

/* Формы */
.auth-form {
    display: none;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.auth-form.active {
    display: flex;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field label {
    font-size: 14px;
    font-weight: 500;
    color: #0d0d0d;
}

/* Общие стили для всех полей ввода */
.auth-field input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(13, 13, 13, 0.12);
    font-size: 16px;
    background: rgba(13, 13, 13, 0.03);
    border-radius: 12px;
    transition: border 0.1s ease, background 0.1s ease;
    box-sizing: border-box;
}

.auth-field input:focus {
    outline: none;
    border-color: #0a7cff;
    background: white;
}

/* Поле с паролем: увеличиваем правый отступ, чтобы не налезать на кнопку "глаз" */
.password-field input {
    padding-right: 50px;
}

/* Контейнер для поля с паролем и кнопкой */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    color: rgba(13, 13, 13, 0.4);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.1s ease;
}

.password-toggle:hover {
    color: #0a7cff;
}

/* Индикатор сложности пароля */
.password-strength {
    margin-top: -8px;
    margin-bottom: 8px;
}

.strength-bar {
    height: 4px;
    border-radius: 2px;
    background: rgba(13, 13, 13, 0.06);
    transition: width 0.1s ease;
    margin-bottom: 4px;
}

.strength-text {
    font-size: 12px;
    color: rgba(13, 13, 13, 0.4);
    text-align: right;
}

.strength-weak .strength-bar { background: #e53e3e; width: 33%; }
.strength-medium .strength-bar { background: #ff8a00; width: 66%; }
.strength-strong .strength-bar { background: #21be19; width: 100%; }

/* Кнопки форм */
.auth-submit-btn {
    padding: 14px 20px;
    border: none;
    background: #0a7cff;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.1s ease;
    margin-top: 8px;
}

.auth-submit-btn:hover {
    background: #248aff;
}

.auth-forgot-link {
    background: none;
    border: none;
    color: #0a7cff;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: color 0.1s ease;
    padding: 8px;
}

.auth-forgot-link:hover {
    color: #248aff;
    text-decoration: underline;
}

.auth-back-link {
    background: none;
    border: none;
    color: rgba(13, 13, 13, 0.58);
    font-size: 14px;
    margin-top: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    transition: color 0.1s ease;
}

.auth-back-link i {
    font-size: 14px;
}

.auth-back-link:hover {
    color: #0d0d0d;
}

/* Футер с соглашением */
.auth-footer {
    width: 100%;
    max-width: 420px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(13, 13, 13, 0.06);
    text-align: center;
    font-size: 12px;
    color: rgba(13, 13, 13, 0.4);
}

.auth-footer a {
    color: #0a7cff;
    text-decoration: none;
    transition: color 0.1s ease;
}

.auth-footer a:hover {
    text-decoration: underline;
    color: #248aff;
}

/* Правая панель */
.auth-right-panel {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #0a0c0e;
}

.auth-right-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.auth-right-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(10, 124, 255, 0.2) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
}

/* ===== НОВЫЕ СТИЛИ ДЛЯ ОШИБОК И УСПЕХА ===== */
.auth-success-message {
    text-align: center;
    color: #21be19;
    margin: 16px 0;
    font-weight: 500;
    font-size: 16px;
}

.auth-error-message {
    text-align: center;
    color: #e53e3e;
    margin: 4px 0 0;
    font-size: 14px;
    display: none;
}

.auth-error-message.show {
    display: block;
}

.auth-field.error input {
    border-color: #e53e3e;
}

/* ===== HERO-БЛОК (только на мобильных) ===== */
.auth-hero {
    display: none; /* по умолчанию скрыт */
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
    max-width: 420px;
}

.auth-hero h1 {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
    color: #0d0d0d;
    margin-bottom: 12px;
}

.auth-hero h1 span {
    background: linear-gradient(135deg, #0a7cff, #6f4ef0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent; /* fallback */
    display: inline-block;
    animation: gradientShift 6s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.auth-hero p {
    font-size: 18px;
    color: rgba(13, 13, 13, 0.58);
    line-height: 1.4;
}

/* Анимация появления hero при открытии модалки */
.auth-fullscreen-overlay.show .auth-hero {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== МОБИЛЬНЫЕ УЛУЧШЕНИЯ ===== */
@media (max-width: 768px) {
    .auth-fullscreen-modal {
        flex-direction: column;
    }

    .auth-right-panel {
        display: none;
    }

    .auth-left-panel {
        padding: 30px 20px;
        background: linear-gradient(145deg, #ffffff 0%, #f9fafc 100%);
    }

    .auth-hero {
        display: block; /* показываем на мобильных */
    }

    .auth-title {
        font-size: 32px;
    }

    .auth-tab {
        font-size: 16px;
        padding: 8px 12px;
    }

    .auth-global-close {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .auth-social-btn,
    .auth-email-btn,
    .auth-submit-btn,
    .auth-back-link {
        padding: 16px 20px;
        font-size: 17px;
    }

    .auth-field input {
        padding: 16px 18px;
        font-size: 17px;
    }

    .password-field input {
        padding-right: 50px;
    }

    .auth-footer {
        font-size: 13px;
        padding-top: 24px;
        margin-top: 48px;
    }
}

@media (max-width: 480px) {
    .auth-left-panel {
        padding: 20px 16px;
    }

    .auth-hero h1 {
        font-size: 28px;
    }

    .auth-hero p {
        font-size: 16px;
    }

    .auth-title {
        font-size: 28px;
    }

    .auth-social-btn,
    .auth-email-btn,
    .auth-submit-btn,
    .auth-back-link {
        padding: 14px 16px;
        font-size: 16px;
    }

    .auth-field input {
        padding: 14px 16px;
    }

    .password-field input {
        padding-right: 48px;
    }

    .auth-footer {
        margin-top: 32px;
        font-size: 12px;
    }
}

.auth-social-btn.mailru i {
    color: #168de2;
}
.auth-social-btn.mailru:hover {
    background: rgba(22, 141, 226, 0.05);
}