:root {
    --bg-color: #0b0f19;
    --second-bg: #131a2c;
    --accent-color: #00dfa2;
    --text-color: #ffffff;
    --text-muted: #8fa0dd;
    --font-stack: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    /* Улучшение переноса длинных слов по всему сайту */
    word-wrap: break-word;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-stack);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.accent-text {
    color: var(--accent-color);
}

/* КНОПКИ */
.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: #000;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 223, 162, 0.4);
}

/* БОЛЬШОЙ ХЕДЕР */
.main-header {
    background: linear-gradient(135deg, rgba(11,15,25,0.8) 0%, rgba(19,26,44,0.9) 100%), 
                url(logo.png);
    background-size: cover;
    background-position: center;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 0 80px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-color);
}

.logo::after {
    content: '.';
    color: var(--accent-color);
}

.nav-menu a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 10px;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

.header-content {
    margin-top: auto;
    margin-bottom: auto;
    max-width: 700px;
}

.header-content h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    overflow-wrap: break-word;
    hyphens: auto;
}

.header-content p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* СТРОКА С КЛЮЧОМ VPN */
.key-section {
    background-color: var(--second-bg);
    padding: 60px 0;
    text-align: center;
    border-top: 2px solid rgba(255, 255, 255, 0.05);
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.key-section h2 {
    font-size: 28px;
    margin-bottom: 25px;
}

.key-container {
    display: flex;
    max-width: 700px;
    margin: 0 auto 15px auto;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.key-container input {
    flex: 1;
    min-width: 0; /* ОБЯЗАТЕЛЬНО: позволяет flex-элементу сжиматься меньше содержимого */
    width: 100%;
    background: transparent;
    border: none;
    color: var(--accent-color);
    padding: 10px 15px;
    font-family: monospace;
    font-size: 14px; /* Чуть меньше для мобилок */
    outline: none;
    text-overflow: ellipsis; /* Добавит троеточие, если не влезает */
}

.btn-copy {
    padding: 10px 25px;
}

.key-hint {
    color: var(--text-muted);
    font-size: 14px;
}

/* БЛОК С 3D ПЛАНЕТОЙ */
.globe-section {
    padding: 50px 0;
    background: radial-gradient(circle at center, #110d29 0%, var(--bg-color) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

#globeViz {
    width: 100%;
    max-width: 420px;   /* Компактный размер на ПК */
    height: 380px;
    margin: 0 auto;
    cursor: grab;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Полностью изолируем жесты внутри блока глобуса */
    touch-action: none !important;
    user-select: none;
    -webkit-user-select: none;
}

#globeViz:active {
    cursor: grabbing;
}

/* ФИКС СВАЙПА: отключаем конфликт жестов браузера/Телеграма на холсте */
#globeViz canvas {
    outline: none;
    position: relative;
    z-index: 1 !important;
    touch-action: none !important; /* ПАЛЕЦ БУДЕТ КРУТИТЬ ГЛОБУС БЕЗ ЗАЛИПАНИЙ */
}

/* Ореол позади аккуратного шара */
#globeViz::before {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, rgba(56, 189, 248, 0.2) 45%, transparent 75%);
    border-radius: 50%;
    filter: blur(45px);
    pointer-events: none;
    z-index: 0;
}

#custom-globe-tooltip {
    position: fixed;
    z-index: 2147483647 !important;
    pointer-events: none;
    transform: translate(-50%, -130%);
    background: rgba(13, 11, 33, 0.96);
    border: 1px solid #a855f7;
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.6);
    padding: 10px 14px;
    border-radius: 10px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: left;
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

#custom-globe-tooltip .tooltip-header {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 3px;
    color: #fff;
}

#custom-globe-tooltip .tooltip-row {
    font-size: 12px;
    color: #b8c1ec;
    margin-top: 3px;
}

/* МОДАЛЬНОЕ ОКНО ПЕРЕХОДА В ТЕЛЕГРАМ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 99999999;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-window {
    background: #131a2c;
    border: 1px solid #a855f7;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
    padding: 30px 25px;
    border-radius: 16px;
    max-width: 380px;
    width: 90%;
    text-align: center;
}

.modal-window h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #fff;
}

.modal-window p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.5;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 15px;
    cursor: pointer;
    text-decoration: underline;
}

/* ИНФОРМАЦИОННЫЙ БЛОК */
.features-section {
    padding: 20px 0;
    text-align: center;
}

.features-section h2 {
    font-size: 36px;
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.feature-card {
    background-color: var(--second-bg);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: left;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 223, 162, 0.2);
}

.feature-card .icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 15px;
}

/* СЕКЦИЯ ТАРИФОВ (2 КАРТОЧКИ) */
.pricing-section {
    padding: 60px 0;
    text-align: center;
    background-color: var(--bg-color);
}

.pricing-section h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.pricing-subtitle {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 40px;
}

/* Ограничиваем ширину до 720px, чтобы 2 карточки не растягивались */
.pricing-grid.two-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 720px;
    margin: 0 auto;
}

.pricing-card {
    background-color: var(--second-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 35px 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 223, 162, 0.4);
}

/* Выделение платного тарифа за 250р */
.pricing-card.popular {
    border: 1.5px solid #a855f7;
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.25);
}

.badge, .badge-trial {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #a855f7;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.badge-trial {
    background: var(--accent-color);
    color: #000;
}

.pricing-header h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.pricing-header .price {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
}

.pricing-header .price span {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 30px;
    padding: 0;
}

.pricing-features li {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.btn-pay {
    width: 100%;
    background: transparent;
    color: #fff;
    border: 1px solid var(--accent-color);
}

.btn-pay:hover {
    background: var(--accent-color);
    color: #000;
}

.btn-accent {
    background: #a855f7 !important;
    border-color: #a855f7 !important;
    color: #fff !important;
}

.btn-accent:hover {
    background: #c084fc !important;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.6);
}


/* ФУТЕР */
.main-footer {
    background-color: #060911;
    padding: 40px 0;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-left p {
    color: var(--text-muted);
    margin-top: 5px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 25px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent-color);
}


/* АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ */
@media (max-width: 768px) {

     #globeViz {
        max-width: 330px; /* Идеальный аккуратный размер под iPhone 12/16 */
        height: 310px;
    }

    #globeViz::before {
        width: 190px;
        height: 190px;
    }

    .nav-menu {
        display: flex;
    }

    .container {
        width: 92%; /* Чуть больше полезного места по бокам */
    }

    .main-header {
        padding: 15px 0 50px 0;
        min-height: auto; /* На мобилке лучше убрать фикс. 80vh для Telegram WebApp */
    }

    .header-content h1 {
        /* Адаптивный размер шрифта: на мелких экранах 24px, на больших до 28px */
        font-size: clamp(23px, 6vw, 28px);
        margin-top: 30px;
    }

    .header-content p {
        font-size: 15px;
    }

    .key-section h2, 
    .features-section h2, 
    .globe-section h2 {
        font-size: 24px;
    }

    .key-container {
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
        gap: 10px;
    }

    .key-container input {
        background: rgba(0, 0, 0, 0.4);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
    }

    .btn-copy {
        width: 100%; /* Удобно нажимать пальцем на всю ширину */
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .footer-links a {
        display: block;
        margin: 8px 0;
    }
}