/* Улучшенная палитра для темной и светлой тем */
:root {
    --bg-color-1: #0f051a; /* Чуть светлее, убираем глухой черный */
    --bg-color-2: #1b053a; 
    --bg-color-3: #0a0515;
    --bg-card: rgba(30, 30, 38, 0.5); /* Карточки стали светлее */
    --border-color: rgba(255, 255, 255, 0.1); 
    --text-main: #F8FAFC; 
    --text-muted: #9CA3AF;
}

html.light {
    --bg-color-1: #f8f5ff; 
    --bg-color-2: #eef2ff; 
    --bg-color-3: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.7); 
    --border-color: rgba(0, 0, 0, 0.08); 
    --text-main: #0F172A; /* Насыщенный темный для читаемости */
    --text-muted: #4B5563;
}

/* Живой фон */
body {
    background: linear-gradient(-45deg, var(--bg-color-1), var(--bg-color-2), var(--bg-color-3), var(--bg-color-1));
    background-size: 400% 400%;
    animation: liquidGradient 15s ease infinite;
    color: var(--text-main);
    transition: background 0.5s ease, color 0.5s ease;
}

@keyframes liquidGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* МАГИЧЕСКИЕ ЧАСТИЦЫ (Звезды на фоне) */
.magic-particles {
    position: fixed; inset: 0; z-index: -10; pointer-events: none;
    background-image: 
        radial-gradient(1.5px 1.5px at 20px 30px, rgba(255,255,255,0.4), rgba(0,0,0,0)),
        radial-gradient(2px 2px at 80px 70px, rgba(255,255,255,0.2), rgba(0,0,0,0)),
        radial-gradient(1px 1px at 150px 160px, rgba(255,255,255,0.5), rgba(0,0,0,0)),
        radial-gradient(2px 2px at 250px 90px, rgba(138,43,226,0.3), rgba(0,0,0,0));
    background-repeat: repeat; background-size: 300px 300px;
    animation: starsDrift 60s linear infinite; opacity: 0.6;
}
html.light .magic-particles { opacity: 0.2; filter: invert(1); }
@keyframes starsDrift { 100% { background-position: 1000px 1000px; } }

.brand-text {
    background: linear-gradient(135deg, #A78BFA 0%, #8A2BE2 50%, #4F46E5 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 900;
}
html.light .brand-text {
    background: linear-gradient(135deg, #8A2BE2 0%, #4F46E5 50%, #2563EB 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* Стекло */
.glass-liquid { background: var(--bg-card); backdrop-filter: blur(32px) saturate(180%); -webkit-backdrop-filter: blur(32px) saturate(180%); border: 1px solid var(--border-color); }
.glass-card { background: var(--bg-card); backdrop-filter: blur(24px) saturate(150%); border: 1px solid var(--border-color); border-radius: 24px; transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.glass-card:hover { border-color: rgba(138, 43, 226, 0.5); transform: translateY(-10px) scale(1.02); box-shadow: 0 25px 50px -12px rgba(138, 43, 226, 0.3); }

/* Адаптация модалки под светлую тему */
.glass-modal { background: var(--bg-card); backdrop-filter: blur(40px) saturate(200%); border: 1px solid var(--border-color); }
html.light .glass-modal { background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(0, 0, 0, 0.1); }
html.light #modalTitle, html.light #modalPricingBlock { color: #111827; }
html.light #modalShortDesc { color: #4B5563; }
html.light .bg-black\/20 { background: rgba(0,0,0,0.03); }

.reveal-up { opacity: 0; transform: translateY(50px); transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-visible { opacity: 1; transform: translateY(0); }

select option { background-color: var(--bg-color-3); color: var(--text-main); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: rgba(138, 43, 226, 0.4); border-radius: 10px; }

/* === ИСПРАВЛЕННАЯ СИСТЕМА ЯЗЫКОВ === */
[data-lang] { display: none !important; }

/* Показываем нужный язык */
html[data-current-lang="ru"] [data-lang="ru"] { display: inline-block !important; }
html[data-current-lang="en"] [data-lang="en"] { display: inline-block !important; }
html[data-current-lang="de"] [data-lang="de"] { display: inline-block !important; }

/* Для строчных элементов внутри текста (чтобы не ломали абзацы) */
html[data-current-lang="ru"] span[data-lang="ru"] { display: inline !important; }
html[data-current-lang="en"] span[data-lang="en"] { display: inline !important; }
html[data-current-lang="de"] span[data-lang="de"] { display: inline !important; }

/* === LIVE-ЛЕНТА ЗАКАЗОВ (SOCIAL PROOF) === */
.live-toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 45;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.live-toast {
    background: var(--bg-card);
    backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px -10px rgba(138, 43, 226, 0.3);
    transform: translateX(-120%);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

html.light .live-toast {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.live-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(138,43,226,0.2) 0%, rgba(79,70,229,0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #A78BFA;
    font-size: 14px;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

/* =========================================
   PREMIUM PRODUCT CARD (ИНТЕГРАЦИЯ)
   ========================================= */

/* Шапка и неоновый текст */
.neon-title {
    font-weight: 900;
    margin: 0;
    background: linear-gradient(135deg, var(--text-main) 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(167, 139, 250, 0.2);
}
html.light .neon-title {
    background: linear-gradient(135deg, var(--text-main) 0%, #8A2BE2 100%);
    -webkit-background-clip: text;
    text-shadow: none;
}

/* Ценник */
.price-tag {
    background: linear-gradient(135deg, #8A2BE2, #4B0082);
    color: white;
    font-size: 16px;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Правила (Линии-ограничители) */
.info-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.info-item {
    background: rgba(138, 43, 226, 0.03);
    border-left: 3px solid #6b21a8;
    padding: 12px 16px;
    border-radius: 0 12px 12px 0;
    font-size: 13px;
    color: var(--text-muted);
    transition: all 0.3s ease;
    line-height: 1.5;
}
html.light .info-item {
    background: rgba(138, 43, 226, 0.05);
}
.info-item:hover {
    background: rgba(138, 43, 226, 0.1);
    border-left-color: #a855f7;
    transform: translateX(4px);
    color: var(--text-main);
}
.info-item.highlight {
    border-left-color: #10b981;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
}

/* Разделитель */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 25px 0;
}

/* Преимущества 2x2 */
.features-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
.feature-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-color-3);
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
}
.feature-card:hover {
    border-color: rgba(138, 43, 226, 0.4);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.1);
    transform: translateY(-2px);
}
.feature-icon {
    font-size: 20px;
    color: #a78bfa;
}
html.light .feature-icon { color: #8A2BE2; }
.feature-text h4 {
    margin: 0 0 2px 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}
.feature-text p {
    margin: 0;
    font-size: 11px;
    color: var(--text-muted);
}

/* Главная кнопка покупки */
.buy-button {
    background: linear-gradient(90deg, #8A2BE2, #6b21a8);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(138, 43, 226, 0.25);
}
.buy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(138, 43, 226, 0.4);
    background: linear-gradient(90deg, #9b4dff, #5c009e);
}

/* Кастомный скроллбар для текстовой модалки */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(138, 43, 226, 0.5);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(138, 43, 226, 0.8);
}

/* Фикс мерцания и пропадания элементов для Safari (iOS/iPadOS) */
.product-card, 
.modal-content, 
.faq-item,
.legal-modal {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

/* Убираем серое выделение при тапе пальцем на iPad */
* {
    -webkit-tap-highlight-color: transparent;
}
