html {
    overflow: hidden; /* Полностью убираем скролл на уровне html */
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    width: 100%;
    height: 100%;
    overflow-y: auto; /* Разрешаем скролл только тут */
    overflow-x: hidden; /* Строгий запрет на полосу справа */
    margin: 0;
    padding: 0;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    text-align: center;
    color: #000;
    -webkit-tap-highlight-color: transparent;
    
    /* Скрываем сам скроллбар визуально */
    scrollbar-width: none; /* Для Firefox */
    -ms-overflow-style: none; /* Для старых IE */
}

/* Скрываем скроллбар для Chrome, Safari и Telegram Desktop */
body::-webkit-scrollbar {
    display: none;
    width: 0 !important;
}

/* ШАПКА И ТАБ-БАР (ФИКСИРОВАННЫЕ) */
.user-info, .tab-bar {
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
    box-sizing: border-box;
}

.logo {
    width: 280px;
    height: auto;
    animation: fade 2s ease-in-out infinite alternate;
}

@keyframes fade {
    from { opacity: 0.6; transform: scale(1); }
    to { opacity: 1; transform: scale(1.08); }
}

.user-info {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.98); /* Почти непрозрачный белый для контраста */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    /* Жёсткая тёмная полоска */
    border-bottom: 2px solid #1a1a1a; 
    
    /* Усиленная тень, чтобы шапка "лежала" на контенте */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.user-data {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

#user-name { font-size: 14px; font-weight: 800; }
#user-balance-row { color: #22c55e; font-size: 15px; font-weight: 700; }

#user-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 2px solid #1e73ff;
    object-fit: cover;
}

.top-up-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}

/* СЕКЦИИ (ОТСТУПЫ) */
#shop, #faq-section, #support-section {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 101vh; 
    padding: 100px 20px 120px;
    box-sizing: border-box;
}

.shop-static-logo {
    width: 200px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto 20px auto !important;
}

.features-badge {
    /* Делаем фон темнее и насыщеннее */
    background: rgba(255, 255, 255, 0.4); 
    backdrop-filter: blur(30px); /* Увеличили размытие */
    -webkit-backdrop-filter: blur(30px);
    
    /* Контрастная рамка (теперь её точно будет видно) */
    border: 2px solid rgba(0, 0, 0, 0.7); 
    
    /* Глубокая тень снаружи и легкое свечение внутри */
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.15), 
        inset 0 0 15px rgba(255, 255, 255, 0.5); 
    
    border-radius: 20px;
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 auto 30px auto;
    width: fit-content;
}

.feature-item { font-size: 13px; font-weight: 600; color: #333; display: flex; align-items: center; gap: 10px; }

/* КАРТОЧКИ ТОВАРОВ */
.products {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.product {
    width: 160px;
    background: #000;
    color: #fff;
    padding: 25px 15px;
    border-radius: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.price { 
    background: linear-gradient(135deg, #1e73ff, #0052cc);
    color: #fff;
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 800;
    margin: 10px 0;
}

button {
    background: linear-gradient(to bottom, #1e73ff, #1660d9);
    border: none;
    padding: 12px;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s ease;
}

/* FAQ ИНТЕРФЕЙС */
.faq-item {
    background: #f8faff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 500px;
    margin-bottom: 12px;
    text-align: left;
}

.faq-question {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-question span { font-weight: 700; color: #1a1a1a; font-size: 15px; }

.faq-arrow {
    width: 20px; height: 20px;
    transition: transform 0.3s ease;
    color: #1e73ff;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.3s ease;
    opacity: 0;
}

.faq-item.active { border-color: #1e73ff; background: #fff; }
.faq-item.active .faq-answer { max-height: 200px; padding-bottom: 20px; opacity: 1; }
.faq-item.active .faq-arrow { transform: rotate(180deg); }

/* НИЖНИЙ ТАБ-БАР (СТЕКЛО) */
.tab-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 9999;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #8e8e93;
}

.tab-item.active { color: #1e73ff; }
.tab-item svg { width: 24px; height: 24px; }
.tab-item span { font-size: 11px; font-weight: 600; }

/* МОДАЛЬНЫЕ ОКНА */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.popup-box {
    background: white;
    padding: 25px;
    border-radius: 30px;
    width: 85%;
    max-width: 320px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.close-btn { position: absolute; top: 10px; right: 15px; font-size: 24px; cursor: pointer; color: #999; }

#show-manual-btn {
    width: 100%;
    max-width: 280px;
    margin: 15px auto 0;
    display: block;
    background: #1e73ff;
    color: white;
    padding: 14px;
    border-radius: 15px;
    font-weight: 700;
}

.fast-pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 15px 0; width: 100%; }
.fast-pay { background: #f1f5f9; color: #000; border: 1px solid #e2e8f0; padding: 12px; border-radius: 12px; font-weight: 600; }

#manual-input-section { width: 100%; }
#custom-amount { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid #ddd; margin-bottom: 10px; box-sizing: border-box; font-size: 16px; }

.confirm { background: #22c55e; width: 100%; }
.cancel { background: #ef4444; width: 100%; margin-top: 10px; }

/* ЛОАДЕР ОПЛАТЫ */
.loader-popup { padding: 30px !important; }
.cryptobot-logo { width: 80px; height: 80px; border-radius: 18px; object-fit: contain; }
.spinner { width: 30px; height: 30px; border: 4px solid #f3f3f3; border-top: 4px solid #1e73ff; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* АНИМАЦИЯ НАЖАТИЯ */
button:active, .fast-pay:active, .tab-item:active, .product:active, .top-up-btn:active {
    transform: scale(0.96);
}

/* УВЕДОМЛЕНИЕ (TOAST) */
.toast {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 59, 48, 0.95); /* Ошибка по умолчанию - красная */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: white;
    padding: 14px 30px;
    border-radius: 50px; /* Более округлый вид */
    font-weight: 700;
    font-size: 14px;
    z-index: 20000;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Плавный выезд с отскоком */
    box-shadow: 0 10px 30px rgba(255, 59, 48, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.toast.show { top: 25px; }

/* Цвета для кнопок в модалке подтверждения */
.confirm { 
    background: #22c55e !important; /* Зеленый */
    width: 100%; 
    margin-top: 15px;
}

.cancel { 
    background: #ef4444 !important; /* Красный */
    width: 100%; 
    margin-top: 10px;
}

/* Дополнительный лоск для Toast */
.toast {
    /* Базовый переход для цвета фона */
    transition: top 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), background 0.3s ease;
}
.brand-loader-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 20px;
    /* Анимация пульсации */
    animation: pulse-logo 1.5s ease-in-out infinite;
}

@keyframes pulse-logo {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.9; }
}
/* Возвращаем обводку кнопкам выбора суммы ($2, $5 и т.д.) */
.fast-pay {
    background: #f1f5f9;
    color: #000;
    border: 2px solid #1e73ff !important; /* Синяя жирная обводка */
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fast-pay:active {
    background: #e2e8f0;
    transform: scale(0.95);
}

/* Фикс для карточки товара, чтобы не кликалась мимо кнопки */
.product {
    pointer-events: none !important;
}

.product button {
    pointer-events: auto !important;
}
/* --- ГЛОБАЛЬНЫЕ НАСТРОЙКИ (ПОДПРАВЛЕНО) --- */
html {
    overflow: hidden;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    scrollbar-width: none;
    -ms-overflow-style: none;

    /* ЖИВОЙ ФОН */
    background-color: #020617 !important;
    background: linear-gradient(-45deg, #020617, #0b1120, #1e3a8a, #020617) !important;
    background-size: 400% 400% !important;
    animation: gradientShift 15s ease infinite !important;
    color: #ffffff;
    position: relative;
}

body::-webkit-scrollbar { display: none; width: 0 !important; }

/* ЭФФЕКТЫ: БЛЕСКИ И ЛУЧ */
body::before {
    content: ''; position: fixed; top: -100%; left: -100%; right: -100%; bottom: -100%;
    background-image: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 1px, transparent 1.5px), radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.15) 1.5px, transparent 2px);
    background-size: 400px 400px; animation: sparklesFly 40s linear infinite; z-index: -2; opacity: 0.6; pointer-events: none;
}

body::after {
    content: ''; position: fixed; top: 0; left: -150%; width: 60%; height: 100%;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.01) 30%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.01) 70%, transparent 100%);
    transform: skewX(-25deg); animation: lightSweep 10s cubic-bezier(0.4, 0, 0.2, 1) infinite; z-index: -1; pointer-events: none;
}

/* ШАПКА (СТЕКЛО) */
.user-info {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.user-data { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
#user-name { font-size: 14px; font-weight: 800; color: #fff !important; }
#user-balance-row { color: #22c55e; font-size: 15px; font-weight: 700; }

#user-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 2px solid #1e73ff;
    object-fit: cover;
}

.top-up-btn {
    background: #1e73ff;
    color: #fff !important;
    border: none;
    padding: 8px 15px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}

/* СЕКЦИИ */
#shop, #faq-section, #support-section {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 101vh; 
    padding: 100px 20px 120px;
    box-sizing: border-box;
}

/* КАРТОЧКИ ТОВАРОВ */
.product {
    width: 160px;
    background: rgba(0, 0, 0, 0.5); /* Полупрозрачный черный */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 25px 15px;
    border-radius: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    pointer-events: none !important;
}
.product button { pointer-events: auto !important; color: #fff !important; }

/* --- ПОЛНЫЙ ФИКС ТЕКСТА В МОДАЛКАХ (ЗАГОЛОВКИ И ОПИСАНИЕ) --- */
.popup-box, 
.popup-box h2, 
.popup-box h3, 
.popup-box p, 
.popup-box span, 
.popup-box div,
#manual-input-section label {
    color: #000000 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Фикс для заголовка "Оформляем заказ" и "Переходим в Crypto Bot" */
.popup-box .loader-text, 
.popup-box .status-text {
    color: #000000 !important;
    font-weight: 700 !important;
}

/* Чтобы кнопки внутри модалок (Confirm/Cancel) оставались читаемыми */
.popup-box button, 
.confirm, 
.cancel {
    color: #ffffff !important;
}

/* Если в модалке есть мелкий текст-инструкция */
.popup-box small {
    color: #666666 !important;
}

.popup-box h2, .popup-box p, .popup-box span {
    color: #000 !important; /* Текст в модалках черный */
}

#custom-amount {
    width: 100%; padding: 12px; border-radius: 10px; border: 1px solid #ddd;
    margin-bottom: 10px; font-size: 16px; color: #000 !important;
}

/* КНОПКИ 2, 5, 9, 15 */
.fast-pay {
    background: #f1f5f9;
    color: #000 !important;
    border: 2px solid #1e73ff !important;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    display: flex; justify-content: center; align-items: center;
}

/* ТАБ-БАР (НИЗ) */
.tab-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    z-index: 9999;
}

.tab-item { color: rgba(255, 255, 255, 0.5) !important; }
.tab-item.active { color: #1e73ff !important; }

/* АНИМАЦИИ */
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes sparklesFly { from { transform: translate(0, 0); } to { transform: translate(200px, 200px); } }
@keyframes lightSweep { 0% { left: -150%; opacity: 0; } 5% { opacity: 1; } 35% { left: 150%; opacity: 1; } 100% { left: 150%; opacity: 0; } }

/* КНОПКИ ПОДТВЕРЖДЕНИЯ */
.confirm { background: #22c55e !important; color: #fff !important; margin-top: 15px; width: 100%; padding: 12px; border-radius: 12px; border: none; font-weight: 700; }
.cancel { background: #ef4444 !important; color: #fff !important; margin-top: 10px; width: 100%; padding: 12px; border-radius: 12px; border: none; font-weight: 700; }

/* --- ВОЗВРАЩАЕМ ЦИФРЫ 2, 5, 9, 15 НА МЕСТО --- */

/* Находим кнопки через сетку, в которой они лежат */
.fast-pay-grid .fast-pay {
    color: #000000 !important; /* Строго черный текст */
    font-size: 18px !important; /* Крупный размер, чтобы было видно */
    font-weight: 800 !important; /* Жирный шрифт */
    background-color: #f1f5f9 !important; /* Светлый фон самой кнопки */
    border: 2px solid #1e73ff !important; /* Синяя обводка */
    
    /* Центрируем текст внутри кнопки, чтобы он не улетал */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 50px !important; /* Фиксированная высота, чтобы не схлопнулись */
    opacity: 1 !important;
    visibility: visible !important;
}

/* Если цифры внутри кнопок обернуты в другие теги */
.fast-pay-grid .fast-pay * {
    color: #000000 !important;
    font-weight: 800 !important;
}

/* Эффект при клике: инверсия цветов */
.fast-pay-grid .fast-pay:active {
    background-color: #1e73ff !important;
    color: #ffffff !important;
}

/* --- СТИЛИ КНОПКИ ПЕРЕКЛЮЧЕНИЯ ТЕМЫ --- */
.theme-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.theme-btn:active {
    transform: scale(0.9);
}

/* --- ПРАВИЛА ДЛЯ СВЕТЛОЙ ТЕМЫ --- */

/* Когда у body появляется класс .light-theme, меняем фон */
body.light-theme {
    background-color: #f0f9ff !important;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%) !important;
    color: #0c4a6e !important; /* Глубокий темно-синий текст для читаемости */
}

/* Узор для светлой темы (вместо блесток) */
body.light-theme::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Красивая сетка из точек или линий */
    background-image: radial-gradient(#38bdf8 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    animation: none;
    z-index: -2;
    opacity: 0.3;
}

/* Блик в светлой теме сделаем более "солнечным" */
body.light-theme::after {
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
}

/* Элементы интерфейса в светлой теме */
body.light-theme .user-info, 
body.light-theme .tab-bar {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-color: rgba(3, 105, 161, 0.1) !important;
    color: #0369a1 !important;
}

body.light-theme #user-name { color: #0c4a6e !important; }
body.light-theme .theme-btn { 
    background: rgba(3, 105, 161, 0.1); 
    border-color: rgba(3, 105, 161, 0.2);
    color: #0369a1;
}

/* Карточки товаров в светлой теме */
body.light-theme .product {
    background: white !important;
    border: 1px solid rgba(3, 105, 161, 0.1);
    color: #0c4a6e;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

/* Переключение видимости иконок внутри кнопки */
body.light-theme .sun-icon { display: block !important; }
body.light-theme .moon-icon { display: none !important; }

body:not(.light-theme) .sun-icon { display: none !important; }
body:not(.light-theme) .moon-icon { display: block !important; }
/* =========================================
   ФИНАЛЬНЫЙ ФИКС МАГАЗИНА И ТЕМ
   ========================================= */

/* 1. ОБЩАЯ ПЛАШКА ДЛЯ ПРЕИМУЩЕСТВ (Центральный блок с ракетой, щитом и т.д.) */
.features-badge {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 20px 25px !important;
    border-radius: 25px !important;
    margin: 20px auto !important;
    width: fit-content !important;
    min-width: 200px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* СТИЛЬ ПЛАШКИ В ТЕМНОЙ ТЕМЕ (как на фото 2) */
body:not(.light-theme) .features-badge {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

/* СТИЛЬ ПЛАШКИ В СВЕТЛОЙ ТЕМЕ (делаем стекло) */
body.light-theme .features-badge {
    background: rgba(0, 0, 0, 0.05) !important; /* Легкая тень под стеклом */
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(30, 115, 255, 0.2) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05) !important;
}

/* 2. ТЕКСТ ВНУТРИ ПЛАШКИ (🚀 1 Гбит/с и т.д.) */
.feature-item {
    background: transparent !important; /* Убираем фоны у отдельных строк! */
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-weight: 700 !important;
    font-size: 15px !important;
}

body:not(.light-theme) .feature-item { color: #ffffff !important; }
body.light-theme .feature-item { color: #0c4a6e !important; }

/* 3. ФИКС НЕВИДИМОГО ТЕКСТА (FAQ, ПОМОЩЬ) ДЛЯ СВЕТЛОЙ ТЕМЫ */
body.light-theme #faq-section, 
body.light-theme #support-section,
body.light-theme .faq-question span,
body.light-theme .faq-answer,
body.light-theme .support-content {
    color: #0c4a6e !important;
}

/* Элементы FAQ в светлой теме */
body.light-theme .faq-item {
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(30, 115, 255, 0.1) !important;
}
/* =========================================
   ФИКС НИЖНЕЙ ПАНЕЛИ (TAB BAR)
   ========================================= */

/* 1. Общие настройки для обеих тем */
.tab-bar {
    display: flex !important; /* Принудительно показываем */
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 9999 !important;
}

/* 2. Настройка для СВЕТЛОЙ ТЕМЫ */
body.light-theme .tab-bar {
    background: rgba(255, 255, 255, 0.8) !important; /* Делаем чуть плотнее, чтобы кнопки не терялись */
    border-top: 1px solid rgba(30, 115, 255, 0.2) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05) !important;
}

/* Иконки и текст в светлом таб-баре */
body.light-theme .tab-item {
    color: #64748b !important; /* Серый цвет для неактивных кнопок */
}

body.light-theme .tab-item i, 
body.light-theme .tab-item span {
    color: inherit !important;
}

/* Активная кнопка в светлом таб-баре */
body.light-theme .tab-item.active,
body.light-theme .tab-item.active i,
body.light-theme .tab-item.active span {
    color: #1e73ff !important; /* Ярко-синий для активной */
}

/* 3. Настройка для ТЕМНОЙ ТЕМЫ (на всякий случай) */
body:not(.light-theme) .tab-bar {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body:not(.light-theme) .tab-item {
    color: rgba(255, 255, 255, 0.5) !important;
}

body:not(.light-theme) .tab-item.active {
    color: #1e73ff !important;
}
/* --- ПЛАВНЫЙ ПЕРЕХОД МЕЖДУ ТЕМАМИ --- */

/* Применяем плавность ко всему телу сайта и основным блокам */
body, 
.user-info, 
.tab-bar, 
.product, 
.features-badge, 
.faq-item, 
.theme-btn {
    transition: background 0.5s ease, 
                background-color 0.5s ease, 
                color 0.5s ease, 
                border-color 0.5s ease, 
                box-shadow 0.5s ease !important;
}

/* Фикс для псевдоэлементов (наши блестки и лучи тоже должны затухать плавно) */
body::before, 
body::after {
    transition: opacity 0.8s ease, background 0.8s ease !important;
}
/* --- СТИЛЬ ЭКРАНА ПРИВЕТСТВИЯ С АНИМАЦИЕЙ --- */
#welcome-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000; /* Подняли выше всех */
    transition: opacity 1s ease, visibility 1s ease;
}

/* Цвета для ТЕМНОГО прелоадера (Вечер/Ночь) */
body:not(.light-theme) #welcome-screen {
    background-color: #020617; 
}
body:not(.light-theme) #welcome-text {
    color: #f0f9ff;
}
/* Неон ТОЛЬКО в темной теме */
body:not(.light-theme) #welcome-logo {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
}

/* Цвета для СВЕТЛОГО прелоадера (Утро/День) */
body.light-theme #welcome-screen {
    background-color: #f0f9ff; /* Светло-голубой как в дневной теме */
}
body.light-theme #welcome-text {
    color: #000000;
}
/* В светлой теме логотип без свечения (чистый) */
body.light-theme #welcome-logo {
    filter: none !important;
}

.welcome-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; /* Расстояние между лого, текстом и лоадером */
}

/* Настройки для орла (логотипа) */
#welcome-logo {
    width: 220px !important;
    height: auto;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInWelcomeLogo 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

/* Настройки для текста приветствия */
#welcome-text {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInWelcomeText 1s ease-out 1s forwards;
}

/* Красивая полоска загрузки (Loader) */
.welcome-loader {
    width: 150px;
    height: 3px;
    background: rgba(128, 128, 128, 0.2);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    margin-top: 15px;
    opacity: 0;
    animation: fadeInLoader 0.5s ease-out 1.5s forwards;
}

.welcome-loader::after {
    content: '';
    position: absolute;
    left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, #1e73ff, transparent);
    animation: loadingBarAnimation 1.5s infinite;
}

.welcome-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important; /* Чтобы кнопки магазина работали! */
}

/* --- АНИМАЦИИ --- */

/* Плавное появление орла с выплыванием */
@keyframes fadeInWelcomeLogo {
    from { opacity: 0; transform: translateY(30px) scale(0.9) }
    to { opacity: 1; transform: translateY(0); }
}

/* Плавное появление текста */
@keyframes fadeInWelcomeText {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0) scale(1) }
}

/* Плавное появление лоадера */
@keyframes fadeInLoader {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Движение полоски загрузки */
@keyframes loadingBarAnimation {
    100% { left: 100%; }
}

/* Оверлей именно для юридического окна */
#legal-screen {
    position: fixed !important;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(10px);
    display: none; /* Скрыто по умолчанию */
    justify-content: center;
    align-items: center;
    z-index: 10000 !important; /* Выше приветствия */
}

.legal-card {
    background: #1c1c1e;
    width: 85%;
    max-width: 400px;
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.legal-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.legal-logo {
    width: 120px;
    height: 120px;
    border-radius: 22px;
}

.policy-scroll-box {
    background: #121214;
    padding: 15px;
    border-radius: 16px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid #2c2c2e;
    text-align: left;
}

.policy-scroll-box p { color: #a1a1aa; font-size: 13px; line-height: 1.5; margin-bottom: 10px; }
.policy-scroll-box h3 { color: #fff; font-size: 14px; margin-top: 5px; }

.confirm-btn {
    background: #3a3a3c !important;
    color: #8e8e93 !important;
    border: none;
    padding: 14px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

/* Класс для активной кнопки */
.confirm-btn.active-btn {
    background: #007aff !important;
    color: #fff !important;
    cursor: pointer;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 14px;
    margin-bottom: 10px;
}
.payment-methods-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.pay-card {
    background: #2c2c2e;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}
/* --- ОБНОВЛЕННАЯ МОДАЛКА ПОПОЛНЕНИЯ (Светлый стиль) --- */

#recharge-modal .modal-content {
    background: #ffffff !important; /* Белый фон */
    color: #1c1c1e !important;
    border-radius: 28px !important;
    padding: 25px !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

#recharge-modal h2 {
    color: #1c1c1e;
    font-size: 22px;
    margin-bottom: 8px;
}

.modal-subtitle {
    color: #8e8e93;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Сетка выбора */
.payment-methods-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pay-card {
    background: #f2f2f7; /* Светло-серый фон как в iOS */
    border: 2px solid transparent;
    border-radius: 18px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Обводка при наведении */
.stars-card:hover { border-color: #ffcc00; }
.crypto-card:hover { border-color: #007aff; }

.pay-card-icon { font-size: 30px; margin-bottom: 8px; }
.pay-card-title { font-weight: 700; font-size: 15px; color: #1c1c1e; }
.pay-card-desc { font-size: 11px; color: #8e8e93; }

/* Секция ввода суммы */
#amount-section {
    padding: 10px 0;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Индикатор выбранного метода (Badge) */
.method-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
}
.badge-stars { background: #fff9e6; color: #d4a017; border: 1px solid #ffcc00; }
.badge-crypto { background: #e6f2ff; color: #007aff; border: 1px solid #007aff; }

.modal-input {
    width: 100%;
    background: #f2f2f7;
    border: 2px solid #e5e5ea;
    border-radius: 12px;
    padding: 14px;
    color: #1c1c1e;
    font-size: 18px;
    margin-bottom: 15px;
    outline: none;
    text-align: center;
}

.modal-input:focus { border-color: #007aff; background: #fff; }

/* Кнопки */
.main-btn {
    width: 100%;
    background: #1c1c1e; /* Темная кнопка на белом фоне — топ */
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.back-btn {
    background: none;
    border: none;
    color: #007aff;
    font-size: 14px;
    margin-top: 15px;
    cursor: pointer;
    font-weight: 500;
}
/* Универсальный стиль для лого в лоадере */
.cryptobot-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 10px;
    /* Если хочешь, чтобы звезда пульсировала, оставь это: */
    transition: transform 0.3s ease;
}

.loader-popup {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
