/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    /* Colors */
    --bg-deep: #0a0a0f;
    --bg-card: rgba(20, 20, 28, 0.6);
    --bg-glass-hover: rgba(255, 255, 255, 0.08);
    
    --accent-primary: #6366f1;
    --accent-secondary: #a855f7;
    --accent-cyan: #06b6d4;
    
    --text-white: #ffffff;
    --text-gray: #9ca3af;
    --success: #10b981;
    
    /* Radius Standards */
    --radius-xl: 24px;
    --radius-l: 18px;
    --radius-m: 14px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Manrope', sans-serif;
    user-select: none;
    outline: none;
}

.template-wrapper {
    width: 100%;
    display: block;
}

body {
    background: 
        radial-gradient(ellipse at 20% 10%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 30%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
        linear-gradient(145deg, #0a0a0f 0%, #050508 50%, #0b0b11 100%);
    color: var(--text-white);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    /* Разрешаем скролл, если контент длинный, но убираем горизонтальный */
    overflow-x: hidden; 
    position: relative;
}

/* =========================================
   2. BACKGROUND ANIMATIONS (NEBULA)
   ========================================= */
.nebula-container { 
    position: fixed; inset: 0; overflow: hidden; z-index: 0; 
    pointer-events: none; isolation: isolate;
}
.nebula-layer { 
    position: absolute; border-radius: 50%; filter: blur(44px); 
    opacity: 0.22; will-change: transform;
}
.n-1 { 
    top: -15%; left: -15%; width: 75%; height: 75%; 
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25), transparent 70%); 
    animation: floatOrb 20s infinite alternate ease-in-out; 
}
.n-2 { 
    bottom: -15%; right: -15%; width: 65%; height: 65%; 
    background: radial-gradient(circle, rgba(168, 85, 247, 0.22), transparent 70%); 
    animation: floatOrb 16s infinite alternate-reverse ease-in-out; 
}

/* =========================================
   3. LAYOUT & CONTAINERS
   ========================================= */
.app-container {
    width: 100%; 
    max-width: 400px; /* Унифицировано до 400px для всех страниц */
    padding: 24px 20px 100px 20px; /* Нижний отступ для фиксированных меню */
    display: flex; 
    flex-direction: column; 
    gap: 20px;
    position: relative; 
     z-index: 10;
}

.page-header { 
    text-align: center; 
    margin-bottom: 5px; 
    animation: fadeInUp 0.4s ease forwards; 
}
.page-title { 
    font-size: 24px; 
    font-weight: 800; 
    background: linear-gradient(90deg, #fff, #c7d2fe); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}
.page-subtitle { 
    font-size: 13px; 
    color: var(--text-gray); 
    font-weight: 500; 
    margin-top: 4px; 
}

/* Группировка секций (для страницы оплаты) */
.section-group {
    display: flex; flex-direction: column; gap: 15px;
    animation: fadeInUp 0.5s ease forwards; opacity: 0;
}
.sg-1 { animation-delay: 0.1s; }
.sg-2 { animation-delay: 0.2s; }
.sg-3 { animation-delay: 0.3s; }
.section-title { font-size: 14px; font-weight: 700; color: #fff; padding-left: 4px; }
.section-label { font-size: 13px; color: var(--text-gray); margin-bottom: 8px; font-weight: 600; }

/* =========================================
   4. COMMON COMPONENTS (Cards, Buttons, Inputs)
   ========================================= */
   
/* Buttons */
.btn {
    height: 64px; border: none; border-radius: var(--radius-l); cursor: pointer;
    position: relative; overflow: hidden; transition: transform 0.1s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.96); }

.btn-prime, .btn-full, .btn-action {
    background: linear-gradient(92deg, var(--accent-primary), var(--accent-secondary));
    color: #fff; border: none;
    display: flex; align-items: center; justify-content: center;
}

.shadow {
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3); 
}
/* Эффект потока энергии на главной кнопке */
.btn-prime::after {
    content: ''; position: absolute; top: 0; left: -150%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: skewX(-20deg); animation: energyFlow 5s infinite cubic-bezier(0.4, 0, 0.2, 1); pointer-events: none;
}
.btn-glass {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-white); display: flex; align-items: center; justify-content: center; gap: 10px;
    font-size: 15px; font-weight: 600; transition: background 0.3s, border-color 0.3s, transform 0.1s;
}
.btn-glass:active { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }

/* Inputs */
.glass-input {
    width: 100%; height: 50px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px; padding: 0 16px;
    color: #fff; font-size: 16px; font-family: 'Manrope';
    transition: border-color 0.2s, background 0.2s;
}
.glass-input:focus { border-color: var(--accent-primary); background: rgba(99, 102, 241, 0.05); }
.glass-input::placeholder { color: #52525b; }
.input-group { margin-bottom: 24px; }
.input-label { font-size: 12px; color: var(--text-gray); margin-bottom: 8px; font-weight: 600; display: block; }

/* Generic Glass Card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-l);
    padding: 16px;
    backdrop-filter: blur(16px);
}

/* =========================================
   5. PAGE SPECIFIC: DASHBOARD / HOME
   ========================================= */
.brand-header { 
    display: flex; flex-direction: column; align-items: center; 
    perspective: 800px; margin-bottom: 25px; position: relative;
}

/* Sonar Animation */
.sonar-waves {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 150px; height: 150px; z-index: -1; pointer-events: none;
}
.sonar-circle {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
    border: 1px solid rgba(99, 102, 241, 0.1);
    opacity: 0; animation: softSonar 4s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.sc-1 { width: 100%; height: 100%; animation-delay: 0s; border-color: rgba(99, 102, 241, 0.2); }
.sc-2 { width: 100%; height: 100%; animation-delay: 1.2s; border-color: rgba(168, 85, 247, 0.15); }
.sc-3 { width: 100%; height: 100%; animation-delay: 2.4s; border-color: rgba(6, 182, 212, 0.15); }

/* Logo */
.logo-glass {
    width: 150px; height: 150px;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.12); border-radius: 40px;
    display: flex; justify-content: center; align-items: center;
    backdrop-filter: blur(10px); transform-style: preserve-3d; z-index: 10;
}
.logo-letter {
    font-size: 66px; font-weight: 800;
    background: linear-gradient(180deg, #fff 10%, var(--accent-cyan));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 25px rgba(6, 182, 212, 0.5)); transform: translateZ(30px);
}
.brand-name {
    font-weight: 800; font-size: 18px;
    background: linear-gradient(90deg, #fff, #c7d2fe);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* Info Panel */
.info-panel {
    background: var(--bg-card); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-xl);
    padding: 20px 24px; display: flex; justify-content: space-between; align-items: flex-start;
    backdrop-filter: blur(24px); box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    opacity: 0; animation: fadeInUp 0.6s 0.3s forwards; position: relative; overflow: hidden;
}
.info-panel::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
    animation: sheen 8s infinite linear; pointer-events: none;
}
.panel-col { display: flex; flex-direction: column; gap: 6px; }
.panel-right { align-items: flex-end; text-align: right; }
.device-info { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.2; }
.device-sub { font-size: 13px; color: var(--text-gray); display: flex; align-items: center; gap: 5px;}
.date-display { display: flex; align-items: baseline; gap: 6px; line-height: 1.2; }
.date-label { font-size: 11px; text-transform: uppercase; font-weight: 700; color: #52525b; }
.date-val { font-family: 'JetBrains Mono', monospace; font-size: 15px; color: #fff; font-weight: 700; }
.status-badge {
    margin-top: 4px;
    padding: 5px 10px; border-radius: 12px; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; gap: 6px;
}

.active-badge {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.active-dot {
    box-shadow: 0 0 10px #10b981;
    background: #10b981;
}

.trial-badge {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.trial-dot {
    box-shadow: 0 0 10px #f59e0b;
    background: #f59e0b;
}

.nonactive-badge {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.nonactive-dot {
    box-shadow: 0 0 10px #ef4444;
    background: #ef4444;
}

.status-dot {
    width: 6px; height: 6px; border-radius: 50%;
    animation: pulseDot 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}


/* Home Buttons specific */
.controls { display: flex; flex-direction: column; gap: 14px; opacity: 0; animation: fadeInUp 0.6s 0.4s forwards; }
.btn-center-wrapper {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    display: flex; align-items: center; justify-content: center; gap: 8px;
    white-space: nowrap; z-index: 2; width: 100%; pointer-events: none;
    padding-right: 40px; padding-left: 10px;
}
.btn-text { font-size: 16px; font-weight: 700; letter-spacing: 0.3px; }
.price-badge {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.2); backdrop-filter: blur(8px);
    padding: 8px 12px; border-radius: 12px; font-size: 13px; font-weight: 800;
    z-index: 3; animation: breathe 3s infinite ease-in-out;
}
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.icon { width: 22px; height: 22px; stroke-width: 2; stroke: currentColor; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* Referral & Link Box */
.bonus-card {
    background: rgba(99, 102, 241, 0.12); border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-l); padding: 16px; margin-bottom: 24px;
}
.bonus-text { font-size: 14px; line-height: 1.5; color: #e0e7ff; margin-bottom: 12px; }
.bonus-highlight { color: #fff; font-weight: 700; color: var(--accent-cyan); }
.referral-count { font-size: 13px; color: var(--text-gray); font-weight: 600; }
.count-val { color: #fff; }

.link-box {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-m); padding: 16px; display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; cursor: pointer; transition: background 0.2s; position: relative;
}
.link-box:active { background: rgba(255,255,255,0.1); }
.link-text {
    font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--accent-cyan);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 90%;
}
.copy-icon { opacity: 0.6; }
.friends-list { 
    display: flex; flex-direction: column; gap: 12px; 
    max-height: 150px;
    overflow-y: auto;
}
.friend-item {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.friend-item:last-child { border-bottom: none; }
.fi-left { display: flex; align-items: center; gap: 12px; }
.avatar {
    width: 40px; height: 40px; background: linear-gradient(135deg, #3f3f46, #27272a);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: #fff;
}
.fi-info { display: flex; flex-direction: column; gap: 2px; }
.fi-name { font-size: 14px; font-weight: 700; color: #fff; }
.fi-sub { font-size: 11px; color: var(--text-gray); }
.fi-right { text-align: right; }
.bonus-val { color: var(--success); font-size: 14px; font-weight: 700; }
.bonus-date { font-size: 11px; color: var(--text-gray); }


/* =========================================
   6. PAGE SPECIFIC: INSTALLATION (Steps & Sliders)
   ========================================= */
/* Slider Wrapper */
.slider-wrapper {
    position: relative; animation: fadeInUp 0.5s 0.1s ease forwards; opacity: 0;
    display: flex; align-items: center;
}
.nav-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 28px; height: 28px;
    background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(4px); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; z-index: 10; cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}
.nav-arrow.hidden { opacity: 0; pointer-events: none; }
.nav-left { left: -8px; }
.nav-right { right: -8px; }

.os-slider-container {
    width: 100%; overflow-x: auto; padding: 10px 4px 15px 4px; 
    display: flex; gap: 12px; scroll-snap-type: x mandatory;
    scrollbar-width: none; scroll-behavior: smooth;
}
.os-slider-container::-webkit-scrollbar { display: none; }

.os-card {
    flex: 0 0 auto; width: 80px; height: 80px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-l);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer; transition: 0.2s; scroll-snap-align: center;
}
.os-card.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
}

.os-icon {
    width: 26px;
    height: 26px;
    fill: currentColor;  /* вместо #fff для наследования */
    opacity: 0.6;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.os-card.active .os-icon {
    opacity: 1;
    fill: #FFFFFF !important;  /* белый вместо cyan */
    transform: scale(1.1);
}

.os-name {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-gray);
    text-align: center;
}

.os-card.active .os-name {
    color: #fff;
}

/* App Selector */
.app-selector-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
    padding: 0 4px;
}
.app-choice-card {
    position: relative;
    height: 72px;
    background: 
        radial-gradient(circle at 15% 20%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 80%, rgba(255,255,255,0.04) 0%, transparent 50%),
        var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-l);
    padding: 16px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    backdrop-filter: blur(16px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}
.app-choice-card:hover {
    border-color: rgba(99,102,241,0.4);
    background: 
        radial-gradient(circle at 15% 20%, rgba(99,102,241,0.12) 0%, transparent 50%),
        var(--bg-card);
    box-shadow: 0 8px 25px rgba(99,102,241,0.2);
    transform: translateY(-2px);
}
.app-choice-card.active {
    border-color: var(--accent-secondary);
    transform: translateY(-3px);
}
.app-choice-name {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.app-choice-sub {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-gray);
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}
.app-choice-card.active .app-choice-sub {
    background: rgba(255,255,255,0.15);
    border-color: rgba(6,182,212,0.6);
    color: var(--accent-cyan);
    box-shadow: 0 2px 8px rgba(6,182,212,0.3);
}
.app-choice-card.active .app-choice-sub.recommended {
    background: linear-gradient(90deg, rgba(245,158,11,0.2), rgba(251,191,36,0.15));
    border-color: rgba(245,158,11,0.6);
    color: #f59e0b;
    box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}
.app-choice-card.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255,255,255,0.2), 
        transparent);
    transform: skewX(-20deg);
    animation: energyFlow 4s infinite 1s;
    pointer-events: none;
}

/* ✅ Адаптив для маленьких экранов */
@media (max-width: 380px) {
    .app-selector-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .app-choice-card {
        height: 68px;
        padding: 14px 12px;
    }
    
    .app-choice-name {
        font-size: 15px;
    }
}

/* ✅ Дополнительные улучшения интеграции */
.step-card.active .app-selector-grid {
    margin-top: 12px;
}

.instruction-text + .app-selector-grid {
    margin-top: 16px;
}

/* ✅ Анимация клика */
.app-choice-card:active {
    transform: translateY(-1px) scale(0.98) !important;
    transition: transform 0.1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Steps */
.steps-container { display: flex; flex-direction: column; gap: 12px; animation: fadeInUp 0.5s 0.2s ease forwards; opacity: 0; }
.step-card {
    background: var(--bg-card); border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-xl); padding: 0 16px; overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); backdrop-filter: blur(12px);
}
.step-header { display: flex; align-items: center; justify-content: space-between; cursor: pointer; height: 64px; }
.step-num {
    width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.05);
    color: var(--text-gray); font-weight: 700; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,0.1); margin-right: 12px; transition: 0.3s;
}
.step-title { font-size: 15px; font-weight: 700; color: #fff; }
.step-indicator { color: var(--text-gray); transition: 0.3s; width: 20px; height: 20px; }
.step-card.active { border-color: rgba(99, 102, 241, 0.4); background: rgba(20, 20, 35, 0.8); padding-bottom: 20px; }
.step-card.active .step-num { background: var(--accent-primary); color: #fff; border-color: transparent; }
.step-card.active .step-indicator { transform: rotate(180deg); color: #fff; }
.step-card.done .step-num { background: var(--success); color: #000; border-color: transparent; }
.step-content { max-height: 0; opacity: 0; transition: all 0.3s ease; overflow: hidden; }
.step-card.active .step-content { max-height: 600px; opacity: 1; margin-top: 4px; }
.instruction-text { font-size: 13px; color: #d1d5db; line-height: 1.5; margin-bottom: 16px; }

.btn-action { width: 100%; height: 50px; border-radius: 14px; font-size: 15px; font-weight: 700; gap: 8px; cursor: pointer; transition: transform 0.1s; }
.btn-action:active { transform: scale(0.97); }
.btn-secondary {
    width: 100%; height: 50px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px; color: #fff; font-size: 14px; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer; margin-top: 8px;
}

/* =========================================
   7. PAGE SPECIFIC: SUBSCRIPTION / PAYMENT
   ========================================= */
/* Current Sub Row */
.current-sub-row { display: flex; justify-content: space-between; align-items: center; }
.cs-info { display: flex; flex-direction: column; gap: 4px; }
.cs-label { font-size: 10px; color: var(--text-gray); text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; }
.cs-value { font-family: 'JetBrains Mono', monospace; font-size: 15px; color: var(--accent-cyan); font-weight: 700; }
.cs-device-tag { font-size: 12px; color: #fff; font-weight: 600; display: flex; align-items: center; gap: 6px;}
.btn-mini { 
    width: 32px; height: 32px; background: rgba(99, 102, 241, 0.15); 
    border: 1px solid rgba(99, 102, 241, 0.3); border-radius: 10px; 
    color: var(--accent-primary); display: flex; align-items: center; justify-content: center; transition: 0.2s; 
}
.btn-mini:active { transform: scale(0.9); background: rgba(99, 102, 241, 0.25); }

/* Plans Grid */
.plans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-card {
    position: relative; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-l); padding: 14px;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    cursor: pointer; transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.plan-card.active {
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.1));
    border-color: var(--accent-primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25); transform: translateY(-2px);
}
.plan-duration { font-size: 22px; font-weight: 800; color: #fff; line-height: 1; }
.plan-period { font-size: 12px; font-weight: 600; color: var(--text-gray); }
.plan-price { margin-top: 4px; font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; color: #e0e7ff; }
.plan-card.active .plan-price { color: var(--accent-cyan); }
.badge { position: absolute; top: -6px; right: -6px; padding: 3px 7px; border-radius: 6px; font-size: 9px; font-weight: 800; text-transform: uppercase; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.badge-hit { background: linear-gradient(90deg, #f59e0b, #d97706); color: #fff; }
.badge-sale { background: linear-gradient(90deg, #10b981, #059669); color: #fff; }

/* Device Range Slider */
.ds-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.ds-count { font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 700; color: var(--accent-primary); }
.slider-container { width: 100%; display: flex; align-items: center; height: 30px; }
.range-slider { -webkit-appearance: none; width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 4px; outline: none; }
.range-slider::-webkit-slider-thumb { 
    -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; 
    background: #fff; box-shadow: 0 0 15px var(--accent-primary); cursor: pointer; 
    border: 2px solid var(--accent-primary); transition: transform 0.1s; margin-top: 0px; 
}
.range-slider::-webkit-slider-thumb:active { transform: scale(1.15); }
.slider-labels { display: flex; justify-content: space-between; margin-top: 6px; padding: 0 2px; }
.sl-item { font-size: 10px; color: var(--text-gray); font-family: 'JetBrains Mono'; }

/* Floating Bottom Bar (Payment) */
.bottom-bar {
    position: fixed; bottom: 24px; left: 50%; 
    transform: translateX(-50%); 
    width: calc(100% - 32px); max-width: 360px;
    background: rgba(18, 18, 22, 0.9); backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px;
    padding: 14px 18px;
    display: flex; align-items: center; justify-content: space-between;
    z-index: 90; box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    opacity: 0; animation: fadeInUpBar 0.6s 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.total-info { display: flex; flex-direction: column; line-height: 1.1; }
.total-label { font-size: 10px; color: var(--text-gray); font-weight: 600; }
.total-price { font-size: 19px; font-weight: 800; color: #fff; margin-top: 2px; }
.currency { font-size: 14px; color: var(--text-gray); font-weight: 600; margin-left: 2px; }
.btn-pay {
    height: 44px; padding: 0 20px;
    background: linear-gradient(92deg, var(--accent-primary), var(--accent-secondary));
    border: none; border-radius: 12px;
    color: #fff; font-size: 14px; font-weight: 700;
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35); transition: transform 0.1s;
}
.btn-pay:active { transform: scale(0.96); }

/* =========================================
   8. MODALS & TOASTS
   ========================================= */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(5, 5, 8, 0.85); z-index: 100;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease;
    display: flex; align-items: flex-end; justify-content: center;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-sheet {
    width: 100%; max-width: 420px;
    background: rgba(18, 18, 22, 0.98);
    border-top-left-radius: 28px; border-top-right-radius: 28px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 24px; padding-bottom: 40px;
    transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    max-height: 85vh; overflow-y: auto;
    position: relative; backdrop-filter: blur(20px);
}
.modal-overlay.active .modal-sheet { transform: translateY(0); }

.sheet-header, .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.sheet-title, .modal-title { font-size: 20px; font-weight: 800; color: #fff; }
.btn-close {
    background: rgba(255,255,255,0.1); border: none; width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer;
}
.btn-full {
    width: 100%; height: 54px; border-radius: 16px; font-size: 16px; font-weight: 700;
}

/* Toast Notification */
.copy-toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: var(--success); color: #000; padding: 8px 16px; border-radius: 20px;
    font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transition: 0.3s; z-index: 100;
}
.copy-toast.show { opacity: 1; transform: translate(-50%, -10px); }

/* =========================================
   9. ANIMATION KEYFRAMES
   ========================================= */
@keyframes floatOrb { 0% { transform: translate3d(0, 0, 0) scale(1); } 100% { transform: translate3d(25px, 25px, 0) scale(1.08); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes energyFlow { 0%, 80% { left: -150%; opacity: 0; } 85% { opacity: 1; } 100% { left: 150%; opacity: 0; } }
@keyframes breathe { 0%, 100% { transform: translateY(-50%) scale(1); } 50% { transform: translateY(-50%) scale(1.05); } }
@keyframes sheen { 0% { left: -100%; } 100% { left: 200%; } }
@keyframes pulseDot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }
@keyframes softSonar { 
    0% { width: 100%; height: 100%; opacity: 0.6; transform: translate(-50%, -50%) scale(1); border-width: 2px; } 
    100% { width: 100%; height: 100%; opacity: 0; transform: translate(-50%, -50%) scale(2.5); border-width: 0px; } 
}
@keyframes fadeInUpBar {
    from { opacity: 0; transform: translate(-50%, 40px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

body.is-locked {
    height: 100vh;          /* Строго высота экрана */
    overflow: hidden;       /* Запрет прокрутки */
    align-items: center;    /* Центрирование по вертикали */
}

/* Убираем лишний отступ снизу, который нужен был для других страниц */
body.is-locked .app-container {
    padding-bottom: 24px;   
    justify-content: center; /* Центрируем контент внутри контейнера */
    height: auto;
}

/* =========================================
   PRELOADER STYLES
   ========================================= */

/* Контейнер на весь экран */
.loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999; /* Поверх всего */
    background: var(--bg-deep, #0a0a0f); /* Используем твой фон */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Класс для скрытия (добавляется через JS) */
.loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Сам спиннер */
.loader-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: relative;
    /* Эффект свечения */
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.15); 
}

/* Создаем два кольца: тусклое и яркое вращающееся */
.loader-spinner::before,
.loader-spinner::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}

/* Статичное тусклое кольцо */
.loader-spinner::before {
    border-color: rgba(255, 255, 255, 0.05);
}

/* Вращающееся яркое кольцо */
.loader-spinner::after {
    border-top-color: var(--accent-cyan, #06b6d4);
    border-right-color: var(--accent-primary, #6366f1);
    animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.full-width-force {
    width: 100vw;               /* Ширина экрана */
    margin-left: -50vw;         /* Сдвиг влево на пол-экрана */
    left: 50%;                  /* Центрирование */
    position: relative;         /* Относительное позиционирование */
    padding: 0 16px;            /* Ваши отступы внутри */
    box-sizing: border-box;
}

.logo-animate {
    opacity: 0;
    will-change: transform, opacity;
    
    /* Начало: чуть меньше и ниже */
    transform: scale3d(0.92, 0.92, 1) translateY(15px);
    
    /* Было 0.7s -> стало 1.2s (медленно и вальяжно) */
    animation: slowFloatReveal 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes slowFloatReveal {
    0% {
        opacity: 0;
        transform: scale3d(0.92, 0.92, 1) translateY(15px);
    }
    100% {
        opacity: 1;
        transform: scale3d(1, 1, 1) translateY(0);
    }
}

#loader {
    pointer-events: none; /* Когда скрыт */
}

/* Вторичная кнопка (серая) */
.uni-setup-btn-secondary {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: white !important;
}

/* Кнопка-ссылка (прозрачная) */
.uni-setup-btn-ghost {
    background: transparent !important;
    border: none !important;
    color: rgba(255,255,255,0.6) !important;
    font-size: 13px;
    padding: 10px;
    width: 100%;
    cursor: pointer;
    margin-top: 5px;
    text-align: center;
}

/* Группа кнопок */
.uni-setup-action-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    margin-top: 15px;
}

/* Блок с ключом (ТОЛЬКО ДЛЯ ПК теперь) */
.uni-setup-key-box {
    background: rgba(0,0,0,0.3);
    padding: 12px;
    border-radius: 10px;
    font-family: monospace;
    font-size: 12px;
    margin-bottom: 15px;
    word-break: break-all;
    opacity: 0.8;
    border: 1px solid rgba(255,255,255,0.05);
    color: #a8b3cf;
    cursor: pointer;
}

/* =========================================
   ПОДСКАЗКА VPN - ПОЛНЫЙ КОД С БЕЛОЙ ТЕНЬЮ
   ======================================== */

/* ✅ ОВЕРЛЕЙ - ОДНА ВОЛНА С КАРТОЧКОЙ */
.setup-spotlight-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(5, 5, 8, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 24px 20px 140px 20px;
    opacity: 0;
    visibility: hidden;
    /* ✅ ОДНА плавная волна для всего */
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: scale(1.02);
    filter: blur(2px);
}

.setup-spotlight-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    filter: blur(0px);
}

/* ✅ КАРТОЧКА - ТОЛЬКО ОНА АНИМИРУЕТСЯ */
.setup-spotlight-hint {
    pointer-events: auto !important;
    max-width: 360px;
    width: 100%;
    background: rgba(18, 18, 22, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-xl);
    padding: 24px 20px 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    margin-bottom: 20px;
    /* ✅ ОДНА ВОЛНА С ОВЕРЛЕЕМ */
    opacity: 0;
    transform: scale(0.92) translateY(30px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: opacity, transform;
}

.setup-spotlight-overlay.active .setup-spotlight-hint {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* ✅ ВНУТРЕННИЕ ЭЛЕМЕНТЫ - БЕЗ АНИМАЦИЙ (мгновенно видимы) */
.hint-icon,
.hint-title,
.hint-text,
.hint-close-btn {
    /* ✅ Никаких анимаций - сразу видны */
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

.hint-icon {
    width: 44px;
    height: 44px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--accent-primary);
}

.hint-title {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #fff, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.hint-text {
    font-size: 14px;
    color: #d1d5db;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 20px;
}

.hint-text strong {
    color: var(--accent-cyan);
    font-weight: 700;
}

.hint-close-btn {
    pointer-events: auto !important;
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(92deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hint-close-btn:active {
    transform: scale(0.97);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* =========================================
   ✅ ТОНКАЯ ЭЛЕГАНТНАЯ АНИМАЦИЯ КНОПКИ
   ======================================== */
.setup-highlight-btn {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 82 !important;
    box-shadow: 
        0 8px 25px rgba(255, 255, 255, 0.25),
        0 0 0 2px rgba(255, 255, 255, 0.15) !important;
    animation: subtleGlowWhite 3.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite !important;
    transform-origin: center !important;
}

.setup-highlight-btn::before {
    content: '' !important;
    position: absolute !important;
    inset: -6px !important;
    border-radius: inherit !important;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%) !important;
    z-index: -1 !important;
    opacity: 0.7 !important;
    animation: softRippleWhite 4.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite !important;
    pointer-events: none !important;
}

.btn-glass.setup-highlight-btn {
    border-color: rgba(255, 255, 255, 0.3) !important;
    animation: subtleGlowWhite 3.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite !important;
}

@keyframes subtleGlowWhite {
    0%, 100% {
        box-shadow: 
            0 8px 25px rgba(255, 255, 255, 0.25),
            0 0 0 2px rgba(255, 255, 255, 0.15);
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 12px 35px rgba(255, 255, 255, 0.35),
            0 0 0 4px rgba(255, 255, 255, 0.1);
        transform: scale(1.01);
    }
}

@keyframes softRippleWhite {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.08);
    }
}

.setup-highlight-btn {
    -webkit-animation: subtleGlowWhite 3.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite !important;
}

.btn, .controls, .btn-glass, .btn-prime {
    pointer-events: auto !important;
    z-index: 90 !important;
}

.success-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 8, 0.92);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(12px);
}

.success-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.success-modal-card {
    width: 100%;
    max-width: 360px;
    background: rgba(18, 18, 22, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    backdrop-filter: blur(24px);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.75);
    transform: scale(0.9) translateY(30px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.success-modal-overlay.active .success-modal-card {
    transform: scale(1) translateY(0);
}

.success-icon {
    width: 72px;
    height: 72px;
    background: rgba(16, 185, 129, 0.2);
    border: 2px solid rgba(16, 185, 129, 0.4);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
}

.success-checkmark {
    width: 32px;
    height: 32px;
    color: var(--success);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.success-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    background: linear-gradient(90deg, #fff, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.success-text {
    font-size: 15px;
    color: #d1d5db;
    line-height: 1.55;
    margin-bottom: 24px;
}

.success-text strong {
    color: #fff;
    font-weight: 700;
}

.success-text .highlight {
    color: var(--accent-cyan);
    font-weight: 700;
}

.success-btn {
    width: 100%;
    height: 52px;
    background: linear-gradient(92deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.4);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.success-btn:active {
    transform: scale(0.97);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

/* Анимация свечения для иконки успеха */
.success-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, transparent 70%);
    border-radius: 24px;
    opacity: 0;
    animation: successGlow 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    z-index: -1;
}

@keyframes successGlow {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* =========================================
   9. LEGAL / FOOTER (ОФЕРТА)
   ========================================= */
.legal-footer {
    text-align: center;
    /* Подтягиваем немного вверх, так как у sg-3 большой отступ снизу */
    margin-top: -30px; 
    padding-bottom: 10px;
    animation: fadeInUp 0.5s 0.4s ease forwards;
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.legal-link {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.3); /* Очень прозрачный, чтобы не мешать */
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15); /* Еле заметное подчеркивание */
    padding-bottom: 1px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.legal-link:active,
.legal-link:hover {
    color: var(--accent-primary); /* Цвет акцента при наведении/нажатии */
    border-color: var(--accent-primary);
    opacity: 1;
}

.legal-copy {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.15);
    max-width: 80%;
    line-height: 1.3;
}

.offer-text {
    font-size: 13px;
    line-height: 1.6;
    color: #d1d5db; /* Светло-серый */
    height: 60vh; /* Высота области прокрутки */
    overflow-y: auto; /* Включаем скролл */
    padding-right: 10px; /* Отступ для ползунка скролла */
    text-align: left;
}

.offer-text h4 {
    color: #fff;
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 15px;
}

.offer-text p {
    margin-bottom: 10px;
}
        
.offer-text::-webkit-scrollbar {
    width: 4px;
}
.offer-text::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.offer-text::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.tabs-container {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #9ca3af;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

        /* Стили для поля дней (скрыто по умолчанию) */
.days-input-container {
    display: none; /* Скрыто в режиме продления */
    margin-bottom: 20px;
     animation: fadeInUp 0.3s ease;
}

.days-input-wrapper {
     position: relative;
}

.days-input {
    width: 100%;
    height: 54px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 0 16px;
    color: #fff;
    font-size: 18px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

.days-suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
    font-weight: 600;
}

.offer-text {
    font-size: 13px;
    line-height: 1.6;
    color: #d1d5db;
    height: 60vh;
    overflow-y: auto;
    padding-right: 10px;

}
.offer-text h4 { color: #fff; margin: 15px 0 8px; font-size: 15px; }
        
.hidden { display: none !important; }