/* Основные стили и сброс */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6d28d9;
    --primary-text-color: #ffffff;
    --primary-dark: #5b21b6;
    --secondary-color: #10b981;
    --accent-color: #8b5cf6;
    --dark-bg: #0f0f23;
    --darker-bg: #0a0a18;
    --card-bg: #1a1a2e;
    --card-hover: #242442;
    --text-primary: #f1f1f1;
    --text-secondary: #a0a0c0;
    --text-muted: #6a6a8a;
    --border-color: #2a2a4a;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'ApiParusFont', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Скроллбар (дефолтная тема) */
::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: #0a0a18;
}

::-webkit-scrollbar-thumb {
    background: #2a2a4a;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6d28d9;
}

html {
    scrollbar-width: thin;
    scrollbar-color: #2a2a4a #0a0a18;
}

/* Подключение пользовательского шрифта */
@font-face {
    font-family: 'ApiParusFont';
    src: url('../fonts/ApiParusFont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Анимация фона - Вариант 1: Частицы и сферы */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(180deg, #0a0a18 0%, #0f0f23 50%, #0a0a18 100%);
}

/* Градиентные сферы (частицы) */
.particle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.6;
}

.particle-1 {
    width: 400px;
    height: 400px;
    top: 10%;
    left: 15%;
    background: radial-gradient(circle, rgba(109, 40, 217, 0.4) 0%, transparent 70%);
    animation: particleFloat1 25s ease-in-out infinite;
}

.particle-2 {
    width: 500px;
    height: 500px;
    top: 20%;
    right: 20%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, transparent 70%);
    animation: particleFloat2 30s ease-in-out infinite;
}

.particle-3 {
    width: 350px;
    height: 350px;
    bottom: 25%;
    left: 25%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, transparent 70%);
    animation: particleFloat3 28s ease-in-out infinite;
}

.particle-4 {
    width: 450px;
    height: 450px;
    bottom: 15%;
    right: 15%;
    background: radial-gradient(circle, rgba(109, 40, 217, 0.38) 0%, transparent 70%);
    animation: particleFloat4 32s ease-in-out infinite;
}

.particle-5 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    animation: particleFloat5 27s ease-in-out infinite;
}

.particle-6 {
    width: 380px;
    height: 380px;
    top: 35%;
    left: 5%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, transparent 70%);
    animation: particleFloat6 29s ease-in-out infinite;
}

/* Анимации для сфер */
@keyframes particleFloat1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    33% {
        transform: translate(40px, -60px) scale(1.1);
        opacity: 0.8;
    }
    66% {
        transform: translate(-30px, 40px) scale(0.9);
        opacity: 0.5;
    }
}

@keyframes particleFloat2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    33% {
        transform: translate(-50px, 70px) scale(1.15);
        opacity: 0.7;
    }
    66% {
        transform: translate(35px, -45px) scale(0.95);
        opacity: 0.55;
    }
}

@keyframes particleFloat3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    33% {
        transform: translate(60px, 50px) scale(1.08);
        opacity: 0.75;
    }
    66% {
        transform: translate(-40px, -35px) scale(0.92);
        opacity: 0.5;
    }
}

@keyframes particleFloat4 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    33% {
        transform: translate(-45px, -55px) scale(1.12);
        opacity: 0.8;
    }
    66% {
        transform: translate(50px, 45px) scale(0.88);
        opacity: 0.55;
    }
}

@keyframes particleFloat5 {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    33% {
        transform: translate(calc(-50% + 55px), calc(-50% - 60px)) scale(1.2);
        opacity: 0.85;
    }
    66% {
        transform: translate(calc(-50% - 45px), calc(-50% + 50px)) scale(0.85);
        opacity: 0.5;
    }
}

@keyframes particleFloat6 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    33% {
        transform: translate(70px, 65px) scale(1.1);
        opacity: 0.7;
    }
    66% {
        transform: translate(-55px, -50px) scale(0.9);
        opacity: 0.5;
    }
}

/* Aurora эффект - градиентные слои */
.aurora-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.aurora-1 {
    background: radial-gradient(ellipse at 30% 20%, rgba(109, 40, 217, 0.15) 0%, transparent 50%);
    animation: auroraShift1 20s ease-in-out infinite;
}

.aurora-2 {
    background: radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.12) 0%, transparent 50%);
    animation: auroraShift2 25s ease-in-out infinite;
}

.aurora-3 {
    background: radial-gradient(ellipse at 50% 50%, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
    animation: auroraShift3 30s ease-in-out infinite;
}

@keyframes auroraShift1 {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1) translate(0, 0);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) translate(5%, -3%);
    }
}

@keyframes auroraShift2 {
    0%, 100% {
        opacity: 0.75;
        transform: scale(1) translate(0, 0);
    }
    50% {
        opacity: 0.95;
        transform: scale(1.15) translate(-4%, 5%);
    }
}

@keyframes auroraShift3 {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1) translate(0, 0);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.3) translate(3%, 4%);
    }
}

/* Сетка overlay */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(109, 40, 217, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(109, 40, 217, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 2;
    animation: gridFade 8s ease-in-out infinite;
}

@keyframes gridFade {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

/* Плавающие точки */
.floating-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.floating-dot {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.8);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
    animation: dotFloat 5s ease-in-out infinite;
}

@keyframes dotFloat {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-20px) scale(1.5);
    }
}

/* Шапка — островок */
.header {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1100px;
    z-index: 1000;
    background-color: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(109, 40, 217, 0.2);
    border-radius: 20px;
    padding: 12px 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35),
                0 0 0 1px rgba(139, 92, 246, 0.08);
    transition: var(--transition);
}

.header:hover {
    border-color: rgba(109, 40, 217, 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(139, 92, 246, 0.15);
}

.header .container {
    padding: 0;
}

.header-main {
    max-width: 800px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-highlight {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 8px 0;
}

.nav-link i {
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: rgba(109, 40, 217, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
}

.nav-link:hover i {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-text-color);
    background-color: rgba(109, 40, 217, 0.2);
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 12px;
}

.nav-link.active i {
    color: var(--primary-color);
}

.mobile-nav-link.active {
    color: var(--primary-color);
}

.auth-buttons {
    display: flex;
    gap: 15px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 20px;
    position: relative;
    padding: 0;
}

.mobile-menu-btn span {
    display: block;
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn span:nth-child(1) {
    top: 0;
}

.mobile-menu-btn span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-btn span:nth-child(3) {
    bottom: 0;
}

.mobile-menu-btn.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Оверлей мобильного меню */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Мобильное меню */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background-color: #0a0a18cf;
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.mobile-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 10px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 14px;
}

.mobile-nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.mobile-nav-link:hover {
    background: var(--card-bg);
    color: var(--text-primary);
}

.mobile-nav-link:hover i {
    color: var(--primary-color);
}

.mobile-nav-link.active {
    background: rgba(109, 40, 217, 0.12);
    color: var(--primary-color);
    font-weight: 600;
}

.mobile-nav-link.active i {
    color: var(--primary-color);
}

.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
}

.mobile-auth-buttons .btn {
    width: 100%;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    justify-content: center;
    gap: 10px;
}

.mobile-auth-buttons .btn-outline {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.mobile-auth-buttons .btn-outline:hover {
    border-color: var(--primary-color);
    background: rgba(109, 40, 217, 0.08);
    color: var(--primary-color);
    transform: none;
}

.mobile-auth-buttons .btn-primary {
    box-shadow: 0 4px 15px rgba(109, 40, 217, 0.3);
}

.mobile-auth-buttons .btn-primary:hover {
    transform: none;
    box-shadow: 0 6px 20px rgba(109, 40, 217, 0.4);
}

/* Кнопки */
.btn {
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: 'ApiParusFont', sans-serif;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

/* Главный экран */
.main-content {
    margin-top: 100px;
}

.hero {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--card-bg);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.badge {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background-color: var(--border-color);
}

/* Исправленный hero-visual */
.hero-visual {
    position: absolute;
    top: 120px;
    right: 0;
    width: 50%;
    max-width: 700px;
    height: 600px;
    transform: translateX(-100px);
}

.visual-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Карточка с кодом */
.visual-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(26, 26, 46, 0.98), 
        rgba(42, 42, 74, 0.98)
    );
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(109, 40, 217, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    z-index: 2;
    /* Убираем transform по умолчанию, будет задан через JS */
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    animation: none;
}

/* Теперь hover ВЫРАВНИВАЕТ карточку */
.visual-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg) !important;
    box-shadow: 
        0 35px 70px rgba(109, 40, 217, 0.4),
        0 0 0 1px rgba(109, 40, 217, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Заголовок карточки */
.card-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: rgba(10, 10, 24, 0.9);
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-header-icons {
    display: flex;
    gap: 8px;
    margin-right: 12px;
}

.card-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.card-icon.red {
    background-color: #ff5f56;
}

.card-icon.yellow {
    background-color: #ffbd2e;
}

.card-icon.green {
    background-color: #27ca3f;
}

.card-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
    flex-grow: 1;
}

.card-language-selector {
    display: flex;
    gap: 5px;
}

.lang-btn {
    background: rgba(42, 42, 74, 0.5);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn:hover {
    background: rgba(109, 40, 217, 0.2);
    color: var(--text-primary);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-color: var(--primary-color);
}

/* Контент карточки */
.card-content {
    padding: 25px;
    height: calc(100% - 70px);
    overflow: hidden;
    background: rgba(10, 10, 24, 0.7);
}

.code-container {
    background-color: rgba(15, 15, 35, 0.95);
    border-radius: 8px;
    padding: 20px;
    height: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(42, 42, 74, 0.5);
}

.code-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    overflow-y: auto;
    padding-right: 5px;
}

.code-lines::-webkit-scrollbar {
    width: 4px;
}

.code-lines::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.code-lines::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

.code-line {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    min-height: 20px;
}

.code-line.active {
    opacity: 1;
    transform: translateX(0);
}

.line-number {
    color: var(--text-muted);
    min-width: 30px;
    text-align: right;
    user-select: none;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.line-content {
    flex: 1;
    word-break: break-all;
    white-space: pre-wrap;
}

/* Анимация потока данных */
.api-flow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.flow-node {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 10px 20px rgba(109, 40, 217, 0.3);
    z-index: 3;
    animation: float 6s infinite ease-in-out;
}

.flow-node.client {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.flow-node.api {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 2s;
    animation-name: wave;
    animation-duration: 4s;
}

.flow-node.ai {
    bottom: 20%;
    right: 10%;
    animation-delay: 1s;
}

.flow-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.connection-line {
    stroke: var(--primary-color);
    stroke-width: 2;
    stroke-dasharray: 10;
    stroke-dashoffset: 0;
    animation: data-flow 3s linear infinite;
    fill: none;
}

/* Плавающие элементы */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    opacity: 0.3;
    animation: float 6s infinite ease-in-out;
}

.floating-element:nth-child(1) {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    top: 20%;
    right: 10%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    bottom: 30%;
    left: 15%;
    animation-delay: 4s;
}

/* Поток данных */
.data-stream {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.data-bit {
    position: absolute;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    animation: data-stream-flow 4s linear infinite;
    opacity: 0.7;
}

.data-bit:nth-child(1) {
    top: 15%;
    left: 5%;
    animation-delay: 0s;
}

.data-bit:nth-child(2) {
    top: 25%;
    left: 20%;
    animation-delay: 0.5s;
}

.data-bit:nth-child(3) {
    top: 35%;
    left: 35%;
    animation-delay: 1s;
}

.data-bit:nth-child(4) {
    top: 45%;
    left: 50%;
    animation-delay: 1.5s;
}

.data-bit:nth-child(5) {
    top: 55%;
    left: 65%;
    animation-delay: 2s;
}

.data-bit:nth-child(6) {
    top: 65%;
    left: 80%;
    animation-delay: 2.5s;
}

@keyframes data-flow {
    0% {
        stroke-dashoffset: 20;
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0.5;
    }
}

@keyframes data-stream-flow {
    0% {
        transform: translateY(-20px) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100px) translateX(50px);
        opacity: 0;
    }
}

/* Секции */
.section {
    padding: 100px 0;
}

.section-dark {
    background-color: var(--darker-bg);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Особенности */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 25px;
}

.feature-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Как это работает */
.steps {
    max-width: 800px;
    margin: 0 auto 80px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 50px;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 35px;
    top: 80px;
    width: 2px;
    height: calc(100% + 30px);
    background: linear-gradient(to bottom, var(--primary-color), transparent);
    z-index: 0;
}

.step-number {
    min-width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    z-index: 1;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.step-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* CTA секция */
.cta-section {
    text-align: center;
    padding: 60px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-top: 60px;
}

.cta-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.cta-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.cta-stat {
    text-align: center;
}

.cta-stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.cta-stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cta-note {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

/* Футер */
.footer {
    background-color: var(--darker-bg);
    padding: 40px 0 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.footer-contacts a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-contacts a:hover {
    color: var(--primary-color);
}

.footer-contacts a i {
    width: 16px;
    text-align: center;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.social-link {
    width: 34px;
    height: 34px;
    background-color: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.social-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Индикаторы загрузки */
.loading-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Модальные окна */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-content.wide-modal {
    max-width: 95%;
    width: 95%;
    height: 90vh;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background-color: var(--darker-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-family: 'ApiParusFont', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
}

.modal-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* Стили для чекбоксов */
.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    background-color: var(--darker-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition);
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: "";
    display: block;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label:hover .checkbox-custom {
    border-color: var(--primary-color);
}

.checkbox-text {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95rem;
}

.checkbox-text a.legal-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.checkbox-text a.legal-link:hover {
    text-decoration: underline;
}

/* Дополнительные шаги */
.steps-additional {
    margin-top: 80px;
    padding: 40px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.steps-additional-header {
    text-align: center;
    margin-bottom: 40px;
}

.steps-additional-header h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.steps-additional-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.steps-additional-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.steps-additional-card {
    padding: 25px;
    background-color: var(--darker-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.steps-additional-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.steps-additional-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.steps-additional-card h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.steps-additional-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* FAQ */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary-color);
}

.faq-question {
    width: 100%;
    padding: 25px 30px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    font-family: 'ApiParusFont', sans-serif;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-icon {
    color: var(--text-secondary);
    font-size: 1rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 30px;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 30px 25px;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .hero-visual {
        position: relative;
        width: 100%;
        max-width: 100%;
        top: 0;
        right: 0;
        margin-top: 60px;
        height: 450px;
        transform: none;
    }
    
    .visual-card {
        transform: none;
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .flow-node.client,
    .flow-node.ai {
        display: none;
    }
    
    .flow-node.api {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .floating-element {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
}

/* Главная страница: header без header-main шире и содержит больше элементов,
   поэтому переключаем на мобильное меню раньше */
@media (max-width: 1100px) {
    .header:not(.header-main) {
        z-index: 2001;
    }

    .header:not(.header-main) .nav-links,
    .header:not(.header-main) .auth-buttons {
        display: none;
    }

    .header:not(.header-main) .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    /* Упрощаем анимацию фона для производительности */
    .particle {
        filter: blur(60px); /* Уменьшаем blur для производительности */
        width: 300px !important;
        height: 300px !important;
    }

    .floating-dots {
        display: none; /* Отключаем точки на мобильных */
    }

    .grid-overlay {
        display: none; /* Отключаем сетку на мобильных */
    }

    .aurora-layer {
        animation-duration: 35s; /* Замедляем анимацию aurora */
    }

    .background-animation {
        background: linear-gradient(180deg, #0a0a18 0%, #0f0f23 100%); /* Упрощаем градиент */
    }

    .header {
        width: calc(100% - 24px);
        padding: 10px 16px;
        border-radius: 16px;
        top: 10px;
        z-index: 2001;
    }

    .nav-links, .auth-buttons {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .step:not(:last-child)::after {
        display: none;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }

    .footer-section .logo {
        justify-content: center;
    }

    .footer-contacts {
        align-items: center;
    }

    .social-links {
        justify-content: center;
    }
    
    /* Адаптивность hero-visual */
    .hero-visual {
        position: relative;
        width: 100%;
        max-width: 100%;
        top: 0;
        right: 0;
        margin-top: 60px;
        height: 400px;
        transform: none;
    }
    
    .card-content {
        padding: 15px;
    }
    
    .code-container {
        padding: 15px;
    }
    
    .code-line {
        font-size: 0.8rem;
        line-height: 1.3;
        gap: 8px;
    }
    
    .line-number {
        min-width: 25px;
        font-size: 0.75rem;
    }
    
    .floating-element,
    .data-stream {
        display: none;
    }
    
    .card-title {
        font-size: 0.8rem;
    }
    
    .lang-btn {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
    
    .steps-additional {
        padding: 25px;
    }
    
    .steps-additional-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-stats {
        gap: 20px;
    }
    
    .cta-stat-value {
        font-size: 1.5rem;
    }
    
    .cta-section {
        padding: 40px 20px;
    }

    .faq-question {
        padding: 20px;
        font-size: 1rem;
    }

    .faq-answer {
        padding: 0 20px;
    }

    .faq-item.active .faq-answer {
        padding: 0 20px 20px;
    }
}

@media (max-width: 480px) {
    .hero-visual {
        position: relative;
        width: 100%;
        max-width: 100%;
        top: 0;
        right: 0;
        margin-top: 60px;
        height: 350px;
        transform: none;
    }
    
    .card-header {
        padding: 10px 15px;
    }
    
    .code-line {
        font-size: 0.75rem;
    }
    
    .card-language-selector {
        display: none;
    }
}

/* Password visibility toggle */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 16px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--text-primary);
}
