/* ========================================================================= */
/* ===                       LOGIN_PAGE.CSS                              === */
/* ========================================================================= */

/* --- 1. БАЗОВЫЕ СТИЛИ ЛЕНДИНГА --- */
#landing-wrapper {
    background-color: #030303;
    width: 100vw;
    color: #fff;
    font-family: 'Manrope', sans-serif;
    position: relative;
    overflow: hidden; /* Запрещаем прокрутку, чтобы не ломался фон */
}

/* СОСТОЯНИЕ: НЕ АВТОРИЗОВАН */
body.not-logged-in {
    background-color: #050505;
    overflow-y: auto;
}
body.not-logged-in .main-container {
    display: none;
}
body.not-logged-in #landing-wrapper {
    display: block;
}

/* СОСТОЯНИЕ: АВТОРИЗОВАН */
body.is-logged-in #landing-wrapper {
    display: none;
}
body.is-logged-in .main-container {
    display: flex;
}

/* --- 2. АНИМИРОВАННЫЙ ФОН (ВЕРТИКАЛЬНЫЙ СКРОЛЛ) --- */
.landing-bg-wrapper {
    position: fixed;
    top: -5%; left: -2%; 
    width: 104%; height: 110%;
    z-index: 0;
    display: flex;
    gap: 16px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.75; 
    filter: brightness(0.9) contrast(1.1);
}

.bg-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 20%;
}

.bg-column img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* Затемняющий оверлей поверх картинок */
.landing-bg-overlay {
    position: fixed; /* Прибиваем к экрану намертво */
    top: 0; left: 0; 
    width: 100vw; height: 100vh;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        to bottom, 
        rgba(3, 3, 3, 0.1) 0%, 
        rgba(3, 3, 3, 0.6) 40%, 
        rgba(3, 3, 3, 0.9) 80%,
        rgba(3, 3, 3, 1) 100%
    );
}

/* АНИМАЦИИ БЕСКОНЕЧНОЙ ПРОКРУТКИ */
.scroll-up { animation: scrollUpAnimation linear infinite; }
.scroll-down { animation: scrollDownAnimation linear infinite; }

.fast { animation-duration: 40s; }
.normal { animation-duration: 55s; }
.slow { animation-duration: 70s; }

@keyframes scrollUpAnimation {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); } 
}
@keyframes scrollDownAnimation {
    0% { transform: translateY(-50%); } 
    100% { transform: translateY(0); }
}

.landing-nav, .landing-hero, .landing-footer {
    position: relative;
    z-index: 5;
}

.hero-desc, .hero-label, .stat-num, .stat-label {
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}


/* --- 3. НАВИГАЦИЯ --- */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: absolute;
    width: 100%;
    top: 0; 
    left: 0;
    z-index: 50;
}

.logo-container .logo-text-main {
    font-family: 'Bowler', sans-serif;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #fff, #ddd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge-beta {
    background: #FABF3C;
    color: #000;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    vertical-align: middle;
    text-transform: uppercase;
}

.btn-landing-login {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 24px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.btn-landing-login:hover {
    border-color: #FABF3C;
    color: #FABF3C;
    background: rgba(250, 191, 60, 0.1);
}


/* --- 4. ГЛАВНЫЙ ЭКРАН И СТЕКЛЯННАЯ РАМКА --- */
.landing-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 60px;
}

.hero-content {
    max-width: 700px; /* Компактный размер */
    width: 100%;
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
}

.hero-label {
    color: #FABF3C;
    font-size: 0.85rem;
    letter-spacing: 3px;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.9;
}

.hero-title {
    font-family: 'Bowler', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem); 
    line-height: 1.1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.hero-logo-img {
    height: 1.1em;
    width: auto;
    object-fit: contain;
    transform: translateY(-4px); 
    filter: drop-shadow(0 10px 20px rgba(250, 191, 60, 0.3));
}

.text-gradient {
    background: linear-gradient(135deg, #FABF3C 0%, #ff8800 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.8)); 
}

.hero-desc {
    color: #ccc;
    font-size: 0.95rem;
    max-width: 550px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.hero-desc strong {
    color: #fff;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn-landing-primary {
    background: #FABF3C;
    color: #000;
    font-weight: 800;
    padding: 12px 30px;
    border-radius: 5px;
    border: none;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(250, 191, 60, 0.2);
}

.btn-landing-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(250, 191, 60, 0.4);
    background: #ffc845;
}

.btn-landing-outline {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 1rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-landing-outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}


/* --- 5. БЕГУЩАЯ СТРОКА --- */
.landing-ticker-wrapper {
    position: relative;
    z-index: 5;
    width: calc(100% + 60px); 
    margin-left: -30px; 
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 12px 0;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.landing-ticker {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.ticker-track {
    display: inline-block;
    white-space: nowrap;
    animation: scrollTicker 30s linear infinite;
}

.ticker-track span {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Bowler', sans-serif;
    opacity: 0.9;
}

.ticker-track span.dot {
    color: #FABF3C;
    margin: 0 30px;
    opacity: 1;
}

@keyframes scrollTicker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}


/* --- 6. КАРТОЧКИ СТАТИСТИКИ --- */
.hero-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.stat-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 10px;
    border-radius: 5px;
    flex: 1;
    transition: all 0.3s ease;
}

.stat-item:hover { 
    background: rgba(255, 255, 255, 0.08); 
    border-color: rgba(250, 191, 60, 0.3);
    transform: translateY(-5px);
}

.stat-num { font-family: 'Bowler', sans-serif; font-size: 1.4rem; color: #fff; transition: color 0.3s; }
.stat-label { font-size: 0.75rem; color: #ccc; text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; }
.stat-item:hover .stat-num { color: #FABF3C; }


/* --- 7. ФУТЕР --- */
.landing-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer-links { margin-bottom: 10px; }
.landing-footer a { 
    color: #888; 
    margin: 0 15px; 
    text-decoration: none; 
    font-size: 0.85rem; 
    transition: color 0.2s; 
    position: relative;
    z-index: 51;
}
.landing-footer a:hover { color: #FABF3C; }
.copyright { color: #555; font-size: 0.75rem; }


/* --- 8. СТИЛИ МОДАЛЬНЫХ ОКОН (АВТОРИЗАЦИЯ) --- */
#authModal .modal-content {
    background-color: #121212;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.9);
    border-radius: 24px;
    color: #fff;
}

.auth-logo .logo-text-main { font-family: 'Bowler', sans-serif; color: #fff; letter-spacing: 1px; margin-bottom: 5px; }

#authModal .btn-close { filter: invert(1) grayscale(100%) brightness(200%); opacity: 0.6; z-index: 1051; }
#authModal .btn-close:hover { opacity: 1; }

.auth-divider {
    display: flex; align-items: center; justify-content: center;
    width: 100%; margin: 1.5rem 0; color: #555; 
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background-color: rgba(255, 255, 255, 0.1); }
.auth-divider::before { margin-right: 1rem; }
.auth-divider::after { margin-left: 1rem; }

#authModal .btn-telegram-login {
    background: linear-gradient(135deg, #FABF3C 0%, #FF9900 100%); color: #000;
    font-family: 'Manrope', sans-serif; font-weight: 700; border: none; padding: 14px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 4px 15px rgba(250, 191, 60, 0.2); transition: all 0.2s;
}
#authModal .btn-telegram-login:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(250, 191, 60, 0.4); }

#authModal .btn-email-login {
    background: transparent; border: 1px solid rgba(255, 255, 255, 0.2); color: #fff;
    font-weight: 600; border-radius: 12px; padding: 14px;
    display: flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.2s;
}
#authModal .btn-email-login:hover { border-color: #FABF3C; color: #FABF3C; background: rgba(250, 191, 60, 0.05); }

#authModal .btn-tg-primary {
    background: #FABF3C; color: #000; font-weight: 700; border-radius: 12px; padding: 12px; border: none; transition: all 0.2s;
}
#authModal .btn-tg-primary:hover { background-color: #ffca5c; transform: translateY(-1px); }


/* --- СОВРЕМЕННЫЙ ДИЗАЙН ФОРМЫ (INPUTS) --- */
.modern-input-group { 
    position: relative; 
    text-align: left; 
    margin-bottom: 1.5rem;
}

.modern-label {
    position: absolute; 
    top: -10px; 
    left: 12px;
    background: #121212; /* Цвет фона модалки, чтобы перекрыть рамку */
    padding: 0 6px;
    font-size: 0.8rem; 
    color: #999; 
    z-index: 5; 
    letter-spacing: 0.5px;
    font-weight: 500;
}

.modern-input-wrapper { 
    position: relative; 
    display: flex; 
    align-items: center; 
}

.modern-input-icon {
    position: absolute; 
    left: 16px; 
    color: #666; 
    display: flex; 
    align-items: center;
    pointer-events: none; 
    transition: color 0.3s ease;
    z-index: 10;
}

/* Изменено: padding для размещения иконок с обеих сторон */
.modern-input {
    background-color: rgba(255, 255, 255, 0.03) !important; /* Улучшение дизайна: легкая заливка */
    border: 1px solid rgba(255, 255, 255, 0.15) !important; 
    color: #fff !important;
    font-size: 1rem !important; 
    /* padding: верхний правый нижний левый */
    padding: 14px 45px 14px 48px !important; /* ИСПРАВЛЕНИЕ: 48px слева для Email/Замка, 45px справа для Глаза */
    border-radius: 12px !important; 
    width: 100%; 
    transition: all 0.3s ease;
}

.modern-input:focus {
    background-color: rgba(0, 0, 0, 0.2) !important;
    border-color: #FABF3C !important; 
    box-shadow: 0 0 0 1px #FABF3C !important; 
    outline: none;
}

/* Кнопка-переключатель видимости пароля (Глаз) */
.modern-pwd-toggle {
    position: absolute; 
    right: 14px; /* Тонкое выравнивание справа */
    background: none; 
    border: none; 
    color: #666;
    padding: 0; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer; 
    transition: color 0.3s;
    height: 100%; /* Занимает всю высоту */
    z-index: 10;
}

.modern-pwd-toggle:hover { 
    color: #fff; 
}

/* Кнопка Войти */
.modern-btn-primary {
    background: linear-gradient(135deg, #FFC13B 0%, #FF9800 100%);
    color: #000; 
    font-weight: 700; 
    font-size: 1.05rem; 
    border-radius: 12px; 
    padding: 14px;
    border: none; 
    transition: all 0.3s ease; 
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.2);
}

.modern-btn-primary:hover {
    transform: translateY(-2px); 
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4); 
    color: #000;
}

.modern-forgot-link { color: #aaa; transition: color 0.2s; }
.modern-forgot-link:hover { color: #FABF3C; }
.back-to-main-login-link:hover { color: #fff !important; }

/* --- QR МОДАЛКА (TELEGRAM) --- */
#tg-auth-modal.tg-modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 2000; align-items: center; justify-content: center; animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

#tg-auth-modal .tg-modal-content {
    background: #121212; border: 1px solid rgba(255, 255, 255, 0.1); padding: 2.5rem;
    border-radius: 24px; width: 90%; max-width: 400px; text-align: center;
    position: relative; box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7); color: #fff;
    display: flex; flex-direction: column; align-items: center;
}
#tg-auth-modal .tg-modal-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.5rem; }
#tg-auth-modal .tg-modal-desc { font-size: 0.9rem; color: #888; margin-bottom: 1.5rem; }
#tg-auth-modal .tg-modal-close { position: absolute; top: 20px; right: 20px; background: none; border: none; color: #666; font-size: 24px; cursor: pointer; }
#tg-auth-modal .tg-modal-close:hover { color: #fff; }
#tg-auth-modal .tg-qr-wrapper { background: #fff; padding: 10px; border-radius: 16px; margin-bottom: 1.5rem; width: 240px; height: 240px; display: flex; align-items: center; justify-content: center; }
#tg-auth-modal #tg-qr-image { width: 100%; height: 100%; display: block; }
#tg-auth-modal .tg-timer { color: #666; font-size: 0.85rem; margin-bottom: 1.5rem; }
#tg-auth-modal #tg-timer-count { color: #FABF3C; font-weight: 700; font-family: monospace; font-size: 1rem; }
#tg-auth-modal .tg-actions { width: 100%; display: flex; flex-direction: column; gap: 10px; }
#tg-auth-modal .btn-tg-outline { background: transparent; border: 1px solid rgba(255, 255, 255, 0.2); color: #ccc; font-weight: 600; border-radius: 10px; padding: 12px; text-decoration: none; width: 100%; transition: all 0.2s; }
#tg-auth-modal .btn-tg-outline:hover { border-color: #FABF3C; color: #FABF3C; }


/* --- 9. МОБИЛЬНАЯ АДАПТАЦИЯ --- */
@media (max-width: 768px) {
    /* ВОЗВРАЩАЕМ СКРОЛЛ ДЛЯ ТЕЛЕФОНОВ */
    body.not-logged-in {
        overflow-y: auto; 
    }
    
    #landing-wrapper { 
        height: auto; 
        min-height: 100vh; 
        overflow-y: visible; 
    }

    .hide-mobile { display: none !important; }
    .bg-column { width: 33.333%; }
    
    .landing-hero { padding-top: 120px; }
    .hero-title { font-size: 2rem; }
    .hero-actions { flex-direction: column; width: 100%; max-width: 300px; margin: 0 auto 30px; }
    .btn-landing-primary, .btn-landing-outline { width: 100%; }
    
    .hero-content {
        padding: 30px 15px;
        border-radius: 14px;
    }
    
    .landing-ticker-wrapper {
        width: calc(100% + 30px);
        margin-left: -15px;
    }
    
    .hero-stats { 
        flex-wrap: wrap; 
        gap: 15px; 
    }
    .stat-item {
        min-width: 45%; 
    }

    .landing-footer {
        position: relative;
        bottom: auto;
        margin-top: 80px;
        padding-bottom: 40px;
    }
    .ticker-track span { font-size: 1rem; }
}