/* ===== СОВРЕМЕННЫЕ CSS ПЕРЕМЕННЫЕ ===== */
:root {
    /* Основные цвета */
    --bg-primary: #0a0e1a;
    --bg-secondary: #1a1f2e;
    --bg-card: #242938;
    --bg-card-hover: #2a2f3e;
    
    /* Акцентные цвета */
    --accent-primary: #00d4ff;
    --accent-secondary: #00ff88;
    --accent-tertiary: #ff6b6b;
    
    /* Градиенты */
    --gradient-primary: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --gradient-secondary: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    --gradient-bg: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    
    /* Текст */
    --text-primary: #ffffff;
    --text-secondary: #b8c5d1;
    --text-muted: #8892a0;
    
    /* Тени */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.3);
    
    /* Размеры */
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    
    /* Анимации */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Адаптивные размеры */
    --container-padding: 2rem;
    --section-spacing: 6rem;
    --card-gap: 2rem;

    /* Header & hero variables */
    --header-bg: rgba(10, 14, 26, 0.95);
    --header-border: rgba(255, 255, 255, 0.1);
    --header-bg-scrolled: rgba(10, 14, 26, 0.85);
    --header-border-scrolled: rgba(255, 255, 255, 0.12);
    --header-shadow-scrolled: 0 6px 24px rgba(0,0,0,0.25);
    --hero-bg: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
}

/* ===== БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    color-scheme: light dark;
}

body {
    font-family: 'Inter', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: opacity 0.3s ease;
}

/* Отключение каретки */
body, main, section, article, div, table, td, th {
    caret-color: transparent !important;
}

/* ===== УЛУЧШЕННАЯ ТИПОГРАФИКА ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h3 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-secondary);
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    margin-bottom: 1rem;
}

/* ===== ИНДИКАТОР ЗАГРУЗКИ ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--bg-card);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: var(--shadow-glow);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ===== СОВРЕМЕННАЯ ШАПКА ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--header-border);
    padding: 1rem var(--container-padding);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Состояние шапки при скролле */
.header.scrolled {
    background: var(--header-bg-scrolled);
    padding: 0.6rem var(--container-padding);
    box-shadow: var(--header-shadow-scrolled);
    border-bottom-color: var(--header-border-scrolled);
}

.logo {
    font-weight: 800;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    transition: var(--transition-smooth);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    text-decoration: none;
    color: inherit;
}

.logo:hover {
    transform: scale(1.05);
}

.logo:active {
    transform: scale(0.98);
}

/* ===== НАВИГАЦИОННОЕ МЕНЮ ===== */
.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: clamp(1rem, 3vw, 2rem);
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    padding: 0.5rem 0;
    transition: var(--transition-smooth);
    position: relative;
    white-space: nowrap;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::before {
    width: 100%;
}

.nav-link[target="_blank"]::after {
    content: '↗';
    margin-left: 0.3rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ===== МОБИЛЬНОЕ МЕНЮ ===== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-smooth);
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-selector {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1rem;
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.lang-selector:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

/* ===== HERO СЕКЦИЯ ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--container-padding);
    position: relative;
    overflow: hidden;
    background: var(--hero-bg);
}

.plexus-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Схема подключения в фоне */
.connection-schema {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: clamp(2rem, 8vw, 4rem);
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
    animation: connectionPulse 4s ease-in-out infinite;
}

.device-node,
.server-node,
.internet-node {
    font-size: clamp(3rem, 8vw, 6rem);
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.8));
}

.connection-line {
    width: clamp(60px, 15vw, 120px);
    height: 4px;
    position: relative;
    border-radius: 2px;
}

.connection-line.encrypted {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 255, 136, 0.8) 25%, 
        rgba(0, 212, 255, 0.8) 75%, 
        transparent 100%);
    animation: dataFlow 2s linear infinite;
}

.connection-line.secure {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 212, 255, 0.8) 25%, 
        rgba(102, 126, 234, 0.8) 75%, 
        transparent 100%);
    animation: dataFlow 2s linear infinite reverse;
}

@keyframes connectionPulse {
    0%, 100% { opacity: 0.1; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.2; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes dataFlow {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    animation: backgroundPulse 8s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.hero-content {
    max-width: 1000px;
    width: 100%;
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-text-centered {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-text-left {
    display: none;
}

.hero-actions-right {
    display: none;
}

.hero-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: #667eea;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.9;
}

.hero-description {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* УТП блоки */
.utp-badges {
    display: flex;
    justify-content: center;
    gap: clamp(1rem, 4vw, 2rem);
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.utp-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: clamp(0.6rem, 1.5vw, 0.8rem) clamp(1rem, 2.5vw, 1.5rem);
    font-size: clamp(0.8rem, 1.8vw, 0.95rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.utp-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
    transition: var(--transition-smooth);
}

.utp-badge:hover::before {
    left: 100%;
}

.utp-badge:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.utp-icon {
    font-size: 1.1em;
}

.utp-text {
    white-space: nowrap;
}

.hero-bonus {
    display: inline-block;
    background: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
    color: #0f0f23;
    padding: clamp(0.8rem, 2vw, 1rem) clamp(1.5rem, 3vw, 2rem);
    border-radius: 50px;
    font-weight: 700;
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    margin-bottom: 3rem;
    animation: pulse 3s infinite;
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
    text-align: center;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* ===== ACTIONS СЕКЦИЯ ===== */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

/* Убираем старые стили visual и image */
.hero-visual,
.hero-image {
    display: none;
}

/* ===== СОВРЕМЕННЫЕ КНОПКИ ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: clamp(0.8rem, 2vw, 1rem) clamp(1.5rem, 3vw, 2rem);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-smooth);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Доступность: видимый фокус */
.btn:focus-visible {
    outline: 3px solid rgba(102, 126, 234, 0.8);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.25);
}

.nav-link:focus-visible {
    outline: 2px solid rgba(102, 126, 234, 0.8);
    outline-offset: 4px;
}

/* Skip link для быстрой навигации клавиатурой */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #ffffff;
    color: #0a0e1a;
    padding: 8px 12px;
    z-index: 10000;
    border-radius: 0 0 8px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: top 0.2s ease;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

.btn-icon {
    width: clamp(16px, 3vw, 20px);
    height: clamp(16px, 3vw, 20px);
}

/* ===== DOWNLOAD СЕКЦИЯ ===== */
.download-section {
    padding: var(--section-spacing) var(--container-padding);
    background: var(--bg-secondary);
}

.download-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.download-header {
    margin-bottom: 3rem;
}

.download-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.download-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 0;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--card-gap);
    max-width: 1200px;
    margin: 0 auto;
}

.download-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: clamp(1.5rem, 3vw, 2rem);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-smooth);
}

.download-card:hover::before {
    opacity: 0.1;
}

.download-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
}

.download-icon {
    flex-shrink: 0;
    width: clamp(50px, 8vw, 60px);
    height: clamp(50px, 8vw, 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    z-index: 1;
    position: relative;
}

.download-icon img {
    width: clamp(24px, 5vw, 32px);
    height: clamp(24px, 5vw, 32px);
    opacity: 0.9;
    transition: var(--transition-smooth);
}

.download-card:hover .download-icon img {
    opacity: 1;
    transform: scale(1.1);
}

.download-info {
    flex: 1;
    text-align: left;
    z-index: 1;
    position: relative;
}

.download-name {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.download-app {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.download-store {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    color: var(--accent-primary);
    font-weight: 500;
}

/* ===== FEATURES СЕКЦИЯ ===== */
.features {
    padding: var(--section-spacing) var(--container-padding);
    background: rgba(26, 31, 46, 0.5);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.features-header {
    text-align: center;
    margin-bottom: 4rem;
}

.features-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.features-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--card-gap);
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    padding: clamp(1.5rem, 3vw, 2rem);
    text-align: center;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-smooth);
}

.feature-card:hover::before {
    opacity: 0.05;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: clamp(2.5rem, 5vw, 3rem);
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.feature-title {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
    z-index: 1;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
}

/* ===== PRICING СЕКЦИЯ ===== */
.pricing {
    padding: var(--section-spacing) var(--container-padding);
    background: var(--bg-primary);
}

.pricing-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.pricing-header {
    margin-bottom: 3rem;
}

.device-selector {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.device-selector label {
    font-size: clamp(1rem, 2vw, 1.1rem);
    font-weight: 600;
    color: var(--text-primary);
}

.device-select {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    padding: 0.8rem 1.2rem;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    cursor: pointer;
    transition: var(--transition-smooth);
    min-width: 200px;
}

.device-select:hover,
.device-select:focus {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    outline: none;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--card-gap);
    margin-top: 2rem;
}

@media (min-width: 992px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
}

.pricing-card {
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    padding: clamp(1.5rem, 3vw, 2rem);
    text-align: center;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 0;
}

.pricing-card:hover::before {
    opacity: 0.05;
}

.pricing-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.15);
}

/* Рекомендуемые тарифы */
.pricing-card.recommended-best {
    border-color: var(--accent-secondary);
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 255, 136, 0.2);
}

.pricing-card.recommended-best:hover {
    transform: translateY(-8px) scale(1.08);
    box-shadow: 0 25px 50px rgba(0, 255, 136, 0.3);
}

.pricing-card.recommended-alt {
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
}

.pricing-card.recommended-alt:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.25);
}

/* Бейджи рекомендаций */
.recommendation-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.6rem 1.8rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    font-size: 1rem;
    font-weight: 700;
    z-index: 2;
    animation: badgePulse 2s infinite;
    white-space: nowrap;
}

.recommendation-badge.best {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.recommendation-badge.alt {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

@keyframes badgePulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
}

.pricing-period {
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
    position: relative;
    z-index: 1;
}

/* Карточки с рекомендацией имеют дополнительный отступ сверху */
.pricing-card.recommended-best .pricing-period,
.pricing-card.recommended-alt .pricing-period {
    margin-top: 1rem;
}

.pricing-prices {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.price-item:last-child {
    border-bottom: none;
}

.price-label {
    font-size: clamp(0.85rem, 1.8vw, 0.95rem);
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.currency-icon {
    font-size: 1.1em;
}

.price-container {
    text-align: right;
}

.price-value {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.daily-price {
    font-size: clamp(0.7rem, 1.5vw, 0.8rem);
    color: var(--accent-primary);
    font-weight: 500;
    display: block;
    margin-top: 0.2rem;
}

.pricing-card .btn {
    margin-top: auto;
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Информационные иконки и tooltips */
.info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: rgba(0, 212, 255, 0.2);
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    color: var(--accent-primary);
    cursor: help;
    margin-left: 0.3rem;
    transition: var(--transition-smooth);
}

.info-icon:hover {
    background: rgba(0, 212, 255, 0.3);
    transform: scale(1.1);
}

/* Тултипы */
.tooltip {
    position: fixed; /* Changed from absolute to fixed */
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-width: 250px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--bg-card);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-primary);
    padding: 3rem var(--container-padding) 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text-muted);
}

.footer a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer a:hover {
    color: var(--accent-secondary);
}

/* ===== АНИМАЦИИ ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}



/* ===== АДАПТИВНОСТЬ ===== */

/* Extra Large Desktop - 1400px+ */
@media (min-width: 1400px) {
    :root {
        --container-padding: 3rem;
        --section-spacing: 8rem;
    }
    
    .hero-content {
        gap: 6rem;
    }
    
    .features-grid,
    .download-grid,
    .pricing-grid {
        gap: 3rem;
    }
}

/* Large Desktop - 1200px to 1399px */
@media (max-width: 1399px) and (min-width: 1200px) {
    :root {
        --container-padding: 2.5rem;
        --section-spacing: 7rem;
    }
}

/* Small Desktop / Large Tablet - 768px to 991px */
@media (max-width: 991px) and (min-width: 768px) {
    :root {
        --container-padding: 1.5rem;
        --section-spacing: 5rem;
        --card-gap: 1.5rem;
    }
    
    .header {
        padding: 1rem var(--container-padding);
    }
    
    .hero-content {
        max-width: 90%;
    }
    
    .utp-badges {
        gap: 1rem;
    }
    
    .utp-badge {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .connection-schema {
        gap: 2rem;
    }
    
    .device-node,
    .server-node,
    .internet-node {
        font-size: 3rem;
    }
    
    .connection-line {
        width: 60px;
    }
    
    .nav-list {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
    }
    
    .download-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
         .pricing-grid {
         gap: 1rem;
     }
}

/* Tablet - 600px to 767px */
@media (max-width: 767px) {
    :root {
        --container-padding: 1rem;
        --section-spacing: 4rem;
        --card-gap: 1rem;
    }
    
    .header {
        padding: 1rem;
    }
    
    .hero {
        padding: 1.5rem 1rem;
        min-height: 90vh;
    }
    
    .hero-content {
        max-width: 95%;
    }
    
    .utp-badges {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        margin-bottom: 2rem;
    }
    
    .utp-badge {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        min-width: 200px;
        justify-content: center;
    }
    
    .connection-schema {
        flex-direction: column;
        gap: 1.5rem;
        opacity: 0.05;
    }
    
    .connection-line {
        width: 4px;
        height: 40px;
        background: linear-gradient(180deg, 
            transparent 0%, 
            rgba(0, 212, 255, 0.6) 25%, 
            rgba(0, 255, 136, 0.6) 75%, 
            transparent 100%) !important;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    /* Мобильное меню */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        box-shadow: var(--shadow-lg);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-smooth);
        z-index: 1000;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 1rem;
    }
    
    .nav-link::before {
        display: none;
    }
    
    .nav-link:hover {
        background: var(--bg-card-hover);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .device-selector {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .device-select {
        min-width: 100%;
        max-width: 300px;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
         .pricing-grid {
         gap: 1rem;
         padding-left: 1rem;
         padding-right: 1rem;
     }
}

/* Mobile Large - 480px to 599px */
@media (max-width: 599px) and (min-width: 480px) {
    .hero-content {
        gap: 2rem;
    }
    
    .hero-actions-right {
        gap: 1.2rem;
    }
    
    .utp-badges {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .utp-badge {
        font-size: 0.75rem;
        padding: 0.5rem 0.7rem;
    }
    
    .hero-actions .btn {
        min-width: 160px;
        font-size: 0.9rem;
    }
    
    .connection-schema {
        opacity: 0.03;
    }
    
    .download-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .download-info {
        text-align: center;
    }
    
         .pricing-grid {
         gap: 1rem;
         padding-left: 1rem;
         padding-right: 1rem;
     }
}

/* Mobile Small - 320px to 479px */
@media (max-width: 479px) {
    :root {
        --container-padding: 0.75rem;
        --section-spacing: 3rem;
    }
    
    .hero {
        padding: 1rem 0.75rem;
        min-height: 85vh;
    }
    
    .hero-content {
        gap: 1.8rem;
    }
    
    .hero-actions-right {
        gap: 1rem;
    }
    
    .utp-badges {
        gap: 0.4rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .utp-badge {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }
    
    .hero-bonus {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
        max-width: 280px;
    }
    
    .hero-actions {
        width: 100%;
        align-items: stretch;
        gap: 0.8rem;
    }
    
    .hero-actions .btn {
        min-width: auto;
    }
    
    .connection-schema {
        display: none;
    }
    
    .download-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.2rem;
    }
    
    .download-info {
        text-align: center;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .device-selector {
        margin-top: 1rem;
    }
    
    .device-select {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
         .pricing-grid {
         gap: 0.75rem;
         padding-left: 0.75rem;
         padding-right: 0.75rem;
     }
     
     .pricing-card {
         min-width: clamp(220px, 72vw, 250px);
     }
    
    .pricing-card {
        padding: 1.3rem;
        min-height: 300px;
    }
    
    .pricing-period {
        font-size: 1.25rem;
        margin-bottom: 1.1rem;
    }
    
    .price-item {
        padding: 0.55rem 0;
    }
    
    .price-label {
        font-size: 0.85rem;
    }
    
    .price-value {
        font-size: 1rem;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .lang-selector {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Extra Small Mobile - up to 319px */
@media (max-width: 319px) {
    :root {
        --container-padding: 0.5rem;
        --section-spacing: 2.5rem;
    }
    
    .hero {
        padding: 0.75rem 0.5rem;
    }
    
    .hero-content {
        gap: 1.5rem;
    }
    
    .hero-actions-right {
        gap: 0.8rem;
    }
    
    .utp-badges {
        gap: 0.3rem;
        flex-direction: column;
        align-items: center;
    }
    
    .utp-badge {
        font-size: 0.65rem;
        padding: 0.4rem 0.5rem;
    }
    
    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }
    
         .pricing-grid {
         gap: 0.5rem;
         padding-left: 0.5rem;
         padding-right: 0.5rem;
     }
     
     .pricing-card {
         min-width: clamp(190px, 78vw, 210px);
     }
    
    .pricing-card {
        padding: 1.1rem;
        min-height: 280px;
    }
}

/* Landscape Mobile - специальные стили для горизонтальной ориентации */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 2rem var(--container-padding);
    }
    
    .hero-content {
        gap: 2rem;
    }
    
    .hero-bonus {
        margin-bottom: 1.5rem;
    }
    
    .hero-actions {
        margin-bottom: 1.5rem;
    }
}

/* High DPI экраны */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduce motion для пользователей с ограниченными возможностями */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero::before {
        animation: none;
    }
    
    .hero-bonus {
        animation: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0a0e1a;
        --bg-secondary: #1a1f2e;
        --bg-card: #242938;
    }
}

/* Light mode support */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #f7f8fc;
        --bg-secondary: #ffffff;
        --bg-card: #ffffff;
        --bg-card-hover: #f2f4f8;

        --text-primary: #0b0f1a;
        --text-secondary: #3a4150;
        --text-muted: #6b7280;

        --accent-primary: #667eea;
        --accent-secondary: #764ba2;

        --gradient-bg: linear-gradient(135deg, #eef1f7 0%, #ffffff 100%);

        --header-bg: rgba(255, 255, 255, 0.92);
        --header-border: rgba(0, 0, 0, 0.06);
        --header-bg-scrolled: rgba(255, 255, 255, 0.95);
        --header-border-scrolled: rgba(0, 0, 0, 0.08);
        --header-shadow-scrolled: 0 8px 24px rgba(0,0,0,0.08);
        --hero-bg: linear-gradient(135deg, #ffffff 0%, #f0f3ff 50%, #eef2ff 100%);

        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
        --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.08);
        --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.10);
    }
    .download-section {
        background: var(--bg-secondary);
    }
    .feature-card:hover,
    .download-card:hover,
    .pricing-card:hover {
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.10);
    }
}

/* Explicit theme overrides via data-theme attribute */
:root[data-theme="dark"] {
    --bg-primary: #0a0e1a;
    --bg-secondary: #1a1f2e;
    --bg-card: #242938;
    --bg-card-hover: #2a2f3e;
    --text-primary: #ffffff;
    --text-secondary: #b8c5d1;
    --text-muted: #8892a0;
    --accent-primary: #00d4ff;
    --accent-secondary: #00ff88;
    --gradient-bg: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    --header-bg: rgba(10, 14, 26, 0.95);
    --header-border: rgba(255, 255, 255, 0.1);
    --header-bg-scrolled: rgba(10, 14, 26, 0.85);
    --header-border-scrolled: rgba(255, 255, 255, 0.12);
    --header-shadow-scrolled: 0 6px 24px rgba(0,0,0,0.25);
    --hero-bg: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
}

:root[data-theme="light"] {
    --bg-primary: #f7f8fc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f2f4f8;
    --text-primary: #0b0f1a;
    --text-secondary: #3a4150;
    --text-muted: #6b7280;
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --gradient-bg: linear-gradient(135deg, #eef1f7 0%, #ffffff 100%);
    --header-bg: rgba(255, 255, 255, 0.92);
    --header-border: rgba(0, 0, 0, 0.06);
    --header-bg-scrolled: rgba(255, 255, 255, 0.95);
    --header-border-scrolled: rgba(0, 0, 0, 0.08);
    --header-shadow-scrolled: 0 8px 24px rgba(0,0,0,0.08);
    --hero-bg: linear-gradient(135deg, #ffffff 0%, #f0f3ff 50%, #eef2ff 100%);
}

/* Theme toggle button */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
}
.theme-toggle:hover { background: var(--bg-card-hover); }
.theme-toggle:focus-visible { outline: 3px solid rgba(102,126,234,0.5); outline-offset: 2px; }
.theme-toggle svg { width: 20px; height: 20px; }

/* Button pressed/disabled states */
.btn:active {
    transform: translateY(0);
    filter: saturate(0.95);
}
.btn[disabled], .btn.disabled, .btn[aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    filter: grayscale(0.1);
}
.btn-primary:disabled, .btn-primary[aria-disabled="true"] {
    background: linear-gradient(135deg, rgba(102,126,234,0.6), rgba(118,75,162,0.6));
}
.btn-secondary:disabled, .btn-secondary[aria-disabled="true"] {
    background: #e7e9ef;
    color: #9aa3b2;
}

/* Print styles */
@media print {
    .header,
    .hero-actions,
    .mobile-menu-toggle,
    .loading-overlay {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
    }
} 

/* Анимации для карточек */
.pricing-card.fade-in {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pricing-card.fade-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.pricing-card.fade-out {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: all 0.15s ease-out;
} 

/* Скелетон-лоадер для карточек тарифов */
.pricing-card.skeleton-card {
    position: relative;
    overflow: hidden;
}

.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.12), rgba(255,255,255,0.06));
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.2s infinite;
    border-radius: 8px;
}

.skeleton-line { height: 16px; margin: 8px 0; }
.skeleton-line.sm { height: 12px; width: 60%; }
.skeleton-line.lg { height: 22px; width: 40%; }
.skeleton-block { height: 44px; border-radius: 12px; }

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}