:root { --bg-color: #f5f5f7; --panel-bg: rgba(255, 255, 255, 0.8); --card-bg: #ffffff; --text-main: #1d1d1f; --text-secondary: #86868b; --accent-blue: #0071e3; --border-color: #e8e8ed; }
body { background-color: var(--bg-color); color: var(--text-main); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }
.container { max-width: 1020px; margin: 0 auto; padding: 0 22px; }

.site-header { background-color: var(--panel-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-color); padding: 14px 0; position: sticky; top: 0; z-index: 100; }
.navbar { display: grid; grid-template-columns: 200px 1fr 200px; align-items: center; }
.logo { color: var(--text-main); font-size: 19px; font-weight: 600; text-decoration: none; letter-spacing: -0.2px; justify-self: start; }
.logo span { color: var(--accent-blue); }
.nav-links { display: flex; justify-content: center; gap: 24px; }
.nav-links a { color: var(--text-main); text-decoration: none; font-size: 14px; font-weight: 400; opacity: 0.8; transition: opacity 0.2s, color 0.2s; }
.nav-links a:hover, .nav-links a.active { opacity: 1; color: var(--accent-blue); }
.header-right { justify-self: end; display: flex; align-items: center; gap: 16px; }

.lang-dropdown { position: relative; display: inline-block; font-size: 13px; font-weight: 500; }
.lang-current { background: #e8e8ed; padding: 6px 12px; border-radius: 8px; cursor: pointer; color: var(--text-main); display: flex; align-items: center; gap: 4px; text-transform: uppercase; user-select: none; }
.lang-current::after { content: "▼"; font-size: 9px; color: var(--text-secondary); }
.lang-list { display: none; position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--border-color); border-radius: 10px; box-shadow: 0 4px 18px rgba(0,0,0,0.08); overflow: hidden; z-index: 200; min-width: 80px; }
.lang-dropdown.open .lang-list { display: block; }
.lang-item { padding: 8px 14px; cursor: pointer; color: var(--text-main); text-transform: uppercase; text-align: center; }
.lang-item:hover { background: #f5f5f7; color: var(--accent-blue); }
.lang-item.active { font-weight: 600; background: #e8e8ed; }

.hero { padding: 90px 0 50px 0; text-align: center; }
.hero h1 { color: var(--text-main); font-size: 48px; font-weight: 700; margin-bottom: 16px; letter-spacing: -1.2px; line-height: 1.1; }
.hero p { font-size: 21px; color: var(--text-secondary); max-width: 600px; margin: 0 auto 32px auto; line-height: 1.4; }

.stats-bar { display: flex; justify-content: space-around; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 18px; padding: 30px; margin: 20px 0 50px 0; text-align: center; }
.stat-item h2 { font-size: 36px; font-weight: 700; color: var(--accent-blue); margin: 0 0 6px 0; }
.stat-item p { font-size: 14px; color: var(--text-secondary); margin: 0; }

.calc-container { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 18px; padding: 30px; margin: 40px 0; text-align: center; }
.calc-slider { width: 100%; max-width: 500px; margin: 20px auto; -webkit-appearance: none; height: 6px; border-radius: 5px; background: #d2d2d7; outline: none; }
.calc-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-blue); cursor: pointer; }

.section-title { font-size: 32px; font-weight: 700; text-align: center; margin: 60px 0 10px 0; letter-spacing: -0.8px; }
.section-subtitle { text-align: center; color: var(--text-secondary); font-size: 17px; margin-top: 0; margin-bottom: 40px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin: 20px 0 60px 0; }
.card { background-color: var(--card-bg); border-radius: 18px; overflow: hidden; border: 1px solid var(--border-color); box-shadow: 0 4px 24px rgba(0,0,0,0.02); transition: transform 0.3s; display: flex; flex-direction: column; }
.card:hover { transform: scale(1.01); }
.card img { width: 100%; height: 220px; object-fit: cover; background-color: #111827; }
.card-content { padding: 28px; flex: 1; }
.card-content h3 { color: var(--text-main); margin-top: 0; font-size: 21px; font-weight: 600; }
.card-content p { color: var(--text-secondary); line-height: 1.5; font-size: 15px; }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin: 30px 0 60px 0; }
.price-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px; padding: 35px 25px; text-align: center; display: flex; flex-direction: column; justify-content: space-between; position: relative; }
.price-card.featured { border-color: var(--accent-blue); box-shadow: 0 8px 32px rgba(0,113,227,0.08); }
.price-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent-blue); color: white; padding: 4px 12px; font-size: 11px; font-weight: 600; border-radius: 20px; text-transform: uppercase; }
.price-value { font-size: 40px; font-weight: 700; color: var(--text-main); margin: 15px 0; }
.price-value span { font-size: 16px; color: var(--text-secondary); font-weight: 400; }
.price-features { list-style: none; padding: 0; margin: 20px 0 30px 0; text-align: left; font-size: 14px; color: var(--text-secondary); line-height: 2; }
.price-features li::before { content: "✓ "; color: var(--accent-blue); margin-right: 6px; }

.cta-banner { background: linear-gradient(135deg, #111827 0%, #1f2937 100%); color: white; border-radius: 24px; padding: 60px 40px; text-align: center; margin: 80px 0 40px 0; }
.cta-banner h2 { font-size: 36px; font-weight: 700; margin: 0 0 16px 0; }
.cta-banner p { font-size: 18px; opacity: 0.8; max-width: 550px; margin: 0 auto 30px auto; }

.btn { display: inline-block; background-color: var(--accent-blue); color: #fff; padding: 10px 22px; text-decoration: none; font-weight: 500; font-size: 14px; border-radius: 980px; transition: background-color 0.15s; cursor: pointer; border: none; text-align: center; }
.btn:hover { background-color: #0077ed; }
.btn.btn-light { background-color: #ffffff; color: #1d1d1f; }
.btn.btn-outline { background: transparent; border: 1px solid var(--border-color); color: var(--text-main); }
.btn.btn-outline:hover { background: #f5f5f7; }

.site-footer { background-color: var(--bg-color); padding: 50px 0 30px 0; margin-top: 80px; font-size: 12px; color: var(--text-secondary); border-top: 1px solid var(--border-color); }
.footer-links { margin-bottom: 14px; }
.footer-links a { color: var(--text-main); text-decoration: none; margin-right: 16px; opacity: 0.7; }

.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.4); backdrop-filter: blur(8px); align-items: center; justify-content: center; }
.modal-content { background-color: #fff; border-radius: 20px; padding: 35px; width: 100%; max-width: 400px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); text-align: center; position: relative; border: 1px solid #e8e8ed; box-sizing: border-box; }
.close-modal { position: absolute; right: 20px; top: 16px; font-size: 20px; cursor: pointer; color: var(--text-secondary); }
.modal-tabs { display: flex; border-bottom: 1px solid var(--border-color); margin-bottom: 24px; }
.modal-tab { flex: 1; padding: 10px; cursor: pointer; color: var(--text-secondary); font-weight: 500; font-size: 15px; }
.modal-tab.active { color: var(--accent-blue); border-bottom: 2px solid var(--accent-blue); font-weight: 600; }
.auth-input { width: 100%; padding: 12px 16px; margin-bottom: 12px; border: 1px solid #d2d2d7; border-radius: 12px; font-size: 15px; box-sizing: border-box; background-color: #f5f5f7; }
.auth-input:focus { border-color: var(--accent-blue); outline: none; background-color: #fff; }
.auth-btn { width: 100%; background-color: var(--accent-blue); color: #fff; border: none; padding: 14px; border-radius: 12px; font-size: 15px; font-weight: 500; cursor: pointer; margin-top: 10px; }
.key-generator { background: #f5f5f7; border: 1px dashed #d2d2d7; border-radius: 12px; padding: 12px; margin-bottom: 12px; text-align: left; font-size: 12px; }
.generated-key { font-family: monospace; font-size: 13px; color: #111827; word-break: break-all; display: block; margin-top: 6px; background: #fff; padding: 6px; border-radius: 6px; border: 1px solid #e8e8ed; }

.support-widget { position: fixed; bottom: 24px; right: 24px; z-index: 999; }
.support-button { background-color: var(--accent-blue); color: white; width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 8px 24px rgba(0,113,227,0.3); font-size: 24px; }
.chat-window { display: none; width: 320px; height: 400px; background: white; border-radius: 16px; border: 1px solid var(--border-color); box-shadow: 0 12px 36px rgba(0,0,0,0.1); flex-direction: column; overflow: hidden; position: absolute; bottom: 70px; right: 0; }
.chat-header { background: #111827; color: white; padding: 14px 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.chat-messages { flex: 1; padding: 16px; overflow-y: auto; background: #f5f5f7; display: flex; flex-direction: column; gap: 8px; }
.msg { padding: 8px 12px; border-radius: 14px; max-width: 80%; font-size: 13px; text-align: left; }
.msg.system { background: #e8e8ed; color: var(--text-main); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--accent-blue); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-input-area { display: flex; padding: 10px; border-top: 1px solid var(--border-color); background: white; }
.chat-input { flex: 1; border: 1px solid #d2d2d7; border-radius: 20px; padding: 6px 12px; outline: none; font-size: 13px; }
.chat-send { background: none; border: none; color: var(--accent-blue); font-weight: 600; cursor: pointer; padding-left: 8px; }

.sys-req { background: #f5f5f7; border-radius: 12px; padding: 14px; margin-top: 10px; font-size: 13px; color: var(--text-secondary); text-align: left; border: 1px solid var(--border-color); line-height: 1.5; }
.sys-req strong { color: var(--text-main); }
.alert-box { background: #fff3cd; border: 1px solid #ffeeba; color: #856404; padding: 12px; border-radius: 12px; font-size: 13px; margin-top: 14px; text-align: left; line-height: 1.4; }
.about-text { font-size: 15px !important; line-height: 1.6 !important; color: var(--text-secondary) !important; margin-bottom: 28px; }
.about-text strong { color: var(--text-main); }
.about-grid { display: flex; flex-direction: column; gap: 32px; margin-top: 40px; }
.about-card { background: var(--card-bg, #ffffff); border: 1px solid var(--border-color, #e8e8ed); border-radius: 18px; overflow: hidden; display: grid; grid-template-columns: 300px 1fr; min-height: 200px; }
.about-card img { width: 100%; height: 100%; object-fit: cover; background-color: #111827; }
.about-card-body { padding: 28px; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 680px) {
    .about-card { grid-template-columns: 1fr; }
    .about-card img { height: 180px; }
}

/* 1. Privacy-First Section */
.privacy-section { padding: 60px 0; background: #fafafa; margin-top: 60px; }
.privacy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; max-width: 1000px; margin: 40px auto 0; text-align: center; }
.icon-box { font-size: 32px; margin-bottom: 10px; }

/* 2. Global Network Map (Live Status) */
.nodes-grid { display: flex; justify-content: center; gap: 30px; margin: 30px 0; }
.node-point { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.status-dot { width: 10px; height: 10px; background: #32d74b; border-radius: 50%; box-shadow: 0 0 8px #32d74b; }

/* 3. Dark Mode Toggle Styles */
.dark-mode { background: #000; color: #fff; }
.dark-mode .navbar, .dark-mode .stats { border-color: #333; }


/* --- ОПТИМИЗИРОВАННАЯ СЕТКА КАРТОЧЕК --- */
.grid { 
    display: flex !important; 
    flex-wrap: wrap !important; 
    gap: 24px !important; 
    align-items: stretch !important; 
}

.card { 
    display: flex !important; 
    flex-direction: column !important; 
    flex: 1 1 300px !important; 
    height: auto !important; 
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
}

.card-content { 
    display: flex !important; 
    flex-direction: column !important; 
    padding: 24px !important; 
    flex: 1 !important; 
}

.sys-req { 
    margin-top: auto; /* Толкает все элементы ниже себя вверх */
    margin-bottom: 20px; 
    padding: 12px;
    background: #f5f5f7;
    border-radius: 8px;
    font-size: 13px;
}

.btn { 
    margin-top: auto !important; /* Кнопка всегда в самом низу */
    width: 100%;
    box-sizing: border-box;
}

/* Компактный вид для секций Hero */
.hero {
    padding: 40px 0 20px 0;
    text-align: center;
}
.hero h1 {
    margin-bottom: 10px;
    font-size: 2.5rem;
}
.hero p {
    color: #6e6e73;
    max-width: 700px;
    margin: 0 auto 20px auto;
}

/* Центрирование заголовков разделов */
.section-title, h2 {
    text-align: center !important;
    margin-top: 40px !important;
    margin-bottom: 20px !important;
}

/* Ограничение ширины страницы для компактности */
.container {
    max-width: 1000px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* Дополнительные отступы для карточек */
.about-grid, .download-grid {
    gap: 20px !important;
}

/* Принудительное центрирование заголовков разделов */
body h2 {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin: 40px auto 20px auto !important;
}

/* Принудительное центрирование для всех элементов, похожих на заголовки */
body > main > div, 
body > main > h2, 
body > main > h3, 
.section-title, 
h2, 
h3 {
    text-align: center !important;
}

/* Дополнительно убедимся, что они ведут себя как блоки */
h2, h3 {
    display: block !important;
    width: 100% !important;
}
