* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(145deg, #0c0c1d 0%, #1a1a3e 50%, #0d0d2b 100%);
    background-attachment: fixed;
    color: #e0e0e0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    padding: 16px;
    -webkit-user-select: text;
    user-select: text;
}

.logo, .subtitle, .feature, .particles {
    -webkit-user-select: none;
    user-select: none;
}

.particles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.particle { position: absolute; background: rgba(100, 200, 255, 0.12); border-radius: 50%; animation: float 7s infinite ease-in-out; }
@keyframes float { 0%, 100% { transform: translateY(0) scale(1); opacity: 0.2; } 50% { transform: translateY(-30px) scale(1.4); opacity: 0.6; } }

.container { position: relative; z-index: 1; width: 100%; max-width: 650px; text-align: center; padding: 20px 12px; }

.logo { font-size: clamp(2rem, 8vw, 3.2rem); font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 6px; }
.logo-icon { width: clamp(40px, 12vw, 60px); height: auto; }
.subtitle { font-size: clamp(0.8rem, 2.5vw, 1rem); color: #90caf9; letter-spacing: 1.5px; text-transform: uppercase; opacity: 0.8; margin-bottom: 16px; }

.info-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    width: 100%;
}

.status-badge { 
    display: inline-flex; 
    align-items: center; 
    gap: 10px; 
    background: rgba(0, 255, 136, 0.08); 
    border: 1px solid rgba(0, 255, 136, 0.2); 
    padding: 10px 22px; 
    border-radius: 20px; 
    font-size: 0.95rem; 
    color: #00ff88; 
    font-weight: 600; 
    transition: opacity 0.3s ease;
    min-width: 240px;
    justify-content: center;
}
.status-dot { width: 10px; height: 10px; background: #00ff88; border-radius: 50%; animation: pulse-green 2s infinite; box-shadow: 0 0 10px #00ff88; flex-shrink: 0; }
@keyframes pulse-green { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.4); } }

.uptime-badge { 
    display: inline-flex; 
    align-items: center; 
    gap: 10px; 
    background: rgba(100, 181, 246, 0.08); 
    border: 1px solid rgba(100, 181, 246, 0.2); 
    padding: 10px 22px; 
    border-radius: 20px; 
    font-size: 0.95rem; 
    color: #90caf9; 
    font-weight: 500;
    min-width: 240px;
    justify-content: center;
}
.uptime-icon { width: 18px; height: 18px; color: #64b5f6; flex-shrink: 0; }
#uptime-counter { color: #e0e0e0; font-weight: 600; font-variant-numeric: tabular-nums; }

.card { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 20px; padding: clamp(20px, 5vw, 35px) clamp(16px, 4vw, 28px); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); margin-bottom: 24px; }
.card h2 { font-size: clamp(1.1rem, 3.5vw, 1.5rem); margin-bottom: 12px; display: flex; align-items: center; justify-content: center; gap: 10px; background: linear-gradient(135deg, #64b5f6, #ce93d8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-icon { width: 28px; height: 28px; flex-shrink: 0; }
.card p { line-height: 1.6; color: #b0b0c0; font-size: clamp(0.85rem, 2vw, 0.95rem); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 24px 0; }
.feature { background: rgba(100, 180, 255, 0.04); border: 1px solid rgba(100, 180, 255, 0.1); border-radius: 16px; padding: 20px 10px; transition: all 0.25s ease; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.feature:hover { background: rgba(100, 180, 255, 0.08); border-color: rgba(100, 180, 255, 0.25); transform: translateY(-2px); }
.feature-icon { width: 48px; height: 48px; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; color: #64b5f6; }
.feature-icon svg { width: 32px; height: 32px; }
.feature h3 { font-size: 0.95rem; color: #c0d0f0; margin-bottom: 4px; }
.feature span { font-size: 0.8rem; color: #707090; }

.download-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 8px; }
.download-btn { display: flex; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(135deg, rgba(100, 181, 246, 0.1), rgba(206, 147, 216, 0.1)); border: 1px solid rgba(100, 181, 246, 0.25); color: #e0e0e0; text-decoration: none; padding: 14px 10px; border-radius: 12px; font-weight: 600; font-size: 0.9rem; transition: all 0.25s ease; }
.download-btn:hover { background: linear-gradient(135deg, rgba(100, 181, 246, 0.2), rgba(206, 147, 216, 0.2)); border-color: rgba(100, 181, 246, 0.5); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(100, 181, 246, 0.15); }
.btn-icon { width: 22px; height: 22px; flex-shrink: 0; }

/* Группа кнопок */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.payment-btn, .instruction-btn { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    background: linear-gradient(135deg, #00c853, #009624); 
    color: white; 
    border: none; 
    padding: 14px 24px; 
    border-radius: 12px; 
    font-weight: 600; 
    font-size: 0.95rem; 
    cursor: pointer; 
    transition: all 0.2s ease;
    flex: 1;
    min-width: 140px;
    max-width: 200px;
    justify-content: center;
}
.payment-btn:hover, .instruction-btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 25px rgba(0, 200, 83, 0.3); 
}

.instruction-btn {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}
.instruction-btn:hover {
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.3);
}

.telegram-link { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    background: linear-gradient(135deg, #2AABEE, #229ED9); 
    color: white; 
    text-decoration: none; 
    padding: 14px 24px; 
    border-radius: 12px; 
    font-weight: 600; 
    font-size: 0.95rem; 
    transition: all 0.2s ease;
    flex: 1;
    min-width: 140px;
    max-width: 200px;
    justify-content: center;
}
.telegram-link:hover { 
    transform: translateY(-1px); 
    box-shadow: 0 8px 25px rgba(42,171,238,0.3); 
}

.footer { margin-top: 32px; font-size: 0.8rem; color: #505060; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 16px; }
.footer a { color: #64b5f6; text-decoration: none; }

.toast {
    visibility: hidden;
    min-width: 260px;
    background-color: #00c853;
    color: #fff;
    text-align: center;
    border-radius: 10px;
    padding: 14px 20px;
    position: fixed;
    z-index: 3000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
    box-shadow: 0 8px 25px rgba(0, 200, 83, 0.3);
}
.toast.show { visibility: visible; opacity: 1; bottom: 50px; }

.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.85); backdrop-filter: blur(8px); }
.modal-content { background: linear-gradient(145deg, #1a1a3e, #0d0d2b); border: 1px solid rgba(100, 181, 246, 0.3); margin: 5% auto; padding: 30px; border-radius: 20px; width: 90%; max-width: 420px; text-align: center; position: relative; animation: modalPop 0.3s ease; box-shadow: 0 20px 50px rgba(0,0,0,0.5); max-height: 85vh; overflow-y: auto; }
@keyframes modalPop { from { transform: scale(0.8) translateY(20px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.close { position: absolute; top: 15px; right: 20px; font-size: 28px; font-weight: bold; cursor: pointer; color: #90caf9; transition: color 0.2s; z-index: 10; }
.close:hover { color: #ff5252; }

.payment-info { text-align: left; margin-bottom: 20px; }
.info-list { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(100, 181, 246, 0.05);
    border: 1px solid rgba(100, 181, 246, 0.15);
    border-radius: 10px;
    transition: all 0.2s;
}
.info-item:hover {
    background: rgba(100, 181, 246, 0.1);
    border-color: rgba(100, 181, 246, 0.3);
}
.info-item svg { width: 20px; height: 20px; color: #64b5f6; flex-shrink: 0; margin-top: 2px; }
.info-item span { font-size: 0.85rem; color: #b0b0c0; line-height: 1.5; }

.notice-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 193, 7, 0.08);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 10px;
    margin-top: 16px;
}
.notice-box svg { width: 22px; height: 22px; color: #ffc107; flex-shrink: 0; margin-top: 2px; }

.yookassa-btn { 
    display: block; 
    background: rgba(0, 175, 118, 0.15); 
    border: 1px solid rgba(0, 175, 118, 0.4); 
    padding: 14px; 
    border-radius: 10px; 
    color: #00af76; 
    text-decoration: none; 
    text-align: center; 
    font-weight: 600; 
    font-size: 1rem;
    transition: all 0.2s; 
    cursor: pointer;
    width: 100%;
    border: none;
}
.yookassa-btn:not(.disabled):hover { 
    background: rgba(0, 175, 118, 0.25); 
    border-color: #00af76; 
    transform: translateY(-1px); 
}
.yookassa-btn.disabled {
    background: rgba(100, 100, 100, 0.1);
    border-color: rgba(100, 100, 100, 0.3);
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Стили для модального окна инструкции */
.instruction-modal {
    max-width: 600px;
    text-align: left;
}

.instruction-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 24px 0;
}

.step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: rgba(100, 181, 246, 0.05);
    border: 1px solid rgba(100, 181, 246, 0.15);
    border-radius: 12px;
    transition: all 0.2s;
}

.step:hover {
    background: rgba(100, 181, 246, 0.1);
    border-color: rgba(100, 181, 246, 0.3);
}

.step-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #64b5f6, #ce93d8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
    color: white;
}

.step-content h3 {
    font-size: 1rem;
    color: #e0e0e0;
    margin-bottom: 8px;
}

.step-content p {
    font-size: 0.85rem;
    color: #90caf9;
    line-height: 1.6;
    margin-bottom: 8px;
}

.app-screenshot {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

.screenshot-placeholder {
    width: 120px;
    height: 180px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(100, 181, 246, 0.4);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64b5f6;
}

.screenshot-placeholder svg {
    width: 48px;
    height: 48px;
}

.screenshot-placeholder span {
    font-size: 0.8rem;
    font-weight: 600;
}

.key-example {
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed rgba(100, 181, 246, 0.4);
    padding: 10px;
    border-radius: 8px;
    margin-top: 8px;
    overflow-x: auto;
}

.key-example code {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #64b5f6;
    word-break: break-all;
}

.step-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.step-list li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    font-size: 0.85rem;
    color: #b0b0c0;
}

.step-list li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #64b5f6;
    font-weight: bold;
}

.connection-status {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
    color: #00ff88;
    font-weight: 600;
}

.status-indicator .dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

.tips-box {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    margin-top: 20px;
}

.tips-box svg {
    width: 24px;
    height: 24px;
    color: #00ff88;
    flex-shrink: 0;
}

.tips-box ul {
    margin: 0;
    padding-left: 20px;
}

.tips-box li {
    margin-bottom: 6px;
}

.support-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2AABEE, #229ED9);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
}

.support-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(42, 171, 238, 0.3);
}

@media (max-width: 600px) {
    .button-group {
        flex-direction: column;
    }
    .payment-btn, .instruction-btn, .telegram-link {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 400px) {
    .download-grid { grid-template-columns: 1fr; }
    .features { grid-template-columns: repeat(2, 1fr); }
    .logo { flex-direction: column; gap: 8px; }
    .card h2 { flex-direction: column; gap: 8px; }
    .status-badge, .uptime-badge { min-width: 200px; font-size: 0.85rem; padding: 8px 16px; }
    .step { flex-direction: column; gap: 12px; }
}

/* Кнопка Карта сети */
.network-btn { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    background: linear-gradient(135deg, #64b5f6, #7c4dff); 
    color: white; 
    border: none; 
    padding: 14px 24px; 
    border-radius: 12px; 
    font-weight: 600; 
    font-size: 0.95rem; 
    cursor: pointer; 
    transition: all 0.2s ease;
    flex: 1;
    min-width: 140px;
    max-width: 200px;
    justify-content: center;
}
.network-btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 25px rgba(100, 181, 246, 0.3); 
}

/* Модальное окно карты сети */
.network-map-modal {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Схема сети */
.network-diagram {
    background: rgba(12, 12, 29, 0.6);
    border: 1px solid rgba(100, 181, 246, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    position: relative;
}

.diagram-title {
    text-align: center;
    font-size: 1.1rem;
    color: #64b5f6;
    margin-bottom: 16px;
    font-weight: 600;
}

.network-svg {
    width: 100%;
    height: auto;
    max-height: 350px;
}

.node {
    transition: all 0.3s ease;
}

.node:hover {
    transform: scale(1.05);
}

.animated-line {
    stroke-dasharray: 10;
    animation: dash 30s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: -1000;
    }
}

.particle-travel {
    filter: drop-shadow(0 0 6px currentColor);
}

/* Информационный блок */
.info-section {
    margin-bottom: 24px;
}

.info-box {
    background: rgba(100, 181, 246, 0.05);
    border: 1px solid rgba(100, 181, 246, 0.2);
    border-radius: 12px;
    padding: 16px;
}

/* Сетка протоколов */
.protocols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.protocol-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(100, 181, 246, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.protocol-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(100, 181, 246, 0.15);
}

.protocol-card.vless { border-top: 3px solid #64b5f6; }
.protocol-card.trojan { border-top: 3px solid #ce93d8; }
.protocol-card.hysteria { border-top: 3px solid #00ff88; }

.protocol-header {
    background: rgba(100, 181, 246, 0.1);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.protocol-icon {
    font-size: 2rem;
}

.protocol-header h3 {
    color: #e0e0e0;
    font-size: 1.1rem;
    margin: 0;
}

.protocol-body {
    padding: 16px;
}

.protocol-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    flex-wrap: wrap;
}

.flow-item {
    background: rgba(100, 181, 246, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #64b5f6;
    font-weight: 600;
}

.flow-arrow {
    color: #90caf9;
    font-size: 1.2rem;
}

/* Горизонтальные шаги */
.how-it-works {
    margin-bottom: 24px;
}

.steps-horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.h-step {
    flex: 1;
    min-width: 120px;
    background: rgba(100, 181, 246, 0.08);
    border: 1px solid rgba(100, 181, 246, 0.2);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
}

.h-step-num {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #64b5f6, #7c4dff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: bold;
    color: white;
    font-size: 1rem;
}

.h-step-text {
    font-size: 0.85rem;
    color: #b0b0c0;
}

.h-step-arrow {
    color: #64b5f6;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Адаптивность */
@media (max-width: 768px) {
    .button-group {
        grid-template-columns: 1fr;
    }
    .payment-btn, .instruction-btn, .network-btn, .telegram-link {
        max-width: 100%;
        width: 100%;
    }
    
    .network-map-modal {
        max-width: 95%;
    }
    
    .protocols-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-horizontal {
        flex-direction: column;
    }
    
    .h-step-arrow {
        transform: rotate(90deg);
        margin: 8px 0;
    }
    
    .network-svg {
        max-height: 250px;
    }
}

@media (max-width: 400px) {
    .network-svg {
        max-height: 200px;
    }
    
    .protocol-flow {
        flex-direction: column;
        gap: 4px;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
}