/* ============================================
   НЕЙРО-ОРАКУЛ — Футуристичный дизайн
   ============================================ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(18, 18, 26, 0.85);
    --accent: #a855f7;
    --accent-light: #c084fc;
    --accent-glow: rgba(168, 85, 247, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(168, 85, 247, 0.2);
    --success: #22c55e;
    --tg-blue: #229ed9;
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* Фоновые эффекты */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.bg-glow-1 {
    top: -200px;
    left: -100px;
    background: var(--accent);
}

.bg-glow-2 {
    bottom: -200px;
    right: -100px;
    background: #6366f1;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(168, 85, 247, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 85, 247, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 0 20px var(--accent-glow);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--accent-light);
}

.nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav a:hover::after {
    width: 100%;
}

.btn-tg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--tg-blue);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-tg:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 158, 217, 0.4);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    z-index: 1;
    padding: 160px 24px 80px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
    color: var(--accent-light);
    margin-bottom: 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(168, 85, 247, 0); }
}

.hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.hero h1 .gradient {
    background: linear-gradient(135deg, var(--accent-light), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 48px;
}

/* ============================================
   CHAT INTERFACE
   ============================================ */
.chat-section {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto 100px;
    padding: 0 24px;
}

.chat-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(168, 85, 247, 0.1);
}

.chat-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 0 15px var(--accent-glow);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-status .dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.chat-status span {
    font-size: 13px;
    color: var(--text-muted);
}

.chat-messages {
    padding: 24px;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    animation: messageIn 0.3s ease-out;
}

@keyframes messageIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-bot {
    align-self: flex-start;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.message-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: white;
    border-bottom-right-radius: 4px;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--accent-light);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

.chat-input-area {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
}

.chat-input {
    flex: 1;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.chat-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.chat-send {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.chat-send:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features {
    position: relative;
    z-index: 1;
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 12px;
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

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

.feature-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(168, 85, 247, 0.1);
}

.feature-number {
    font-size: 14px;
    color: var(--accent-light);
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-number::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--accent);
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.how-it-works {
    position: relative;
    z-index: 1;
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.step {
    text-align: center;
    padding: 32px;
    position: relative;
}

.step-number {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 24px;
    box-shadow: 0 0 30px var(--accent-glow);
}

.step h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.step p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ============================================
   FAQ
   ============================================ */
.faq {
    position: relative;
    z-index: 1;
    padding: 80px 24px;
    max-width: 800px;
    margin: 0 auto;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 48px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: rgba(168, 85, 247, 0.3);
}

.faq-question {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--accent-light);
}

.faq-icon {
    width: 24px;
    height: 24px;
    transition: var(--transition);
    color: var(--accent-light);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-inner {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

/* ============================================
   BLOG SECTION (на главной)
   ============================================ */
.blog-preview {
    position: relative;
    z-index: 1;
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.blog-card-image {
    height: 180px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(99, 102, 241, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.blog-card-content {
    padding: 24px;
}

.blog-card-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(168, 85, 247, 0.1);
    border-radius: 6px;
    font-size: 12px;
    color: var(--accent-light);
    margin-bottom: 12px;
}

.blog-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

.read-more {
    color: var(--accent-light);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.blog-card:hover .read-more {
    gap: 8px;
}

/* ============================================
   BLOG PAGE
   ============================================ */
.blog-page {
    padding-top: 120px;
    padding-bottom: 80px;
}

.blog-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
    margin-top: 48px;
}

/* ============================================
   ARTICLE PAGE
   ============================================ */
.article-page {
    padding-top: 120px;
    padding-bottom: 80px;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.article-header {
    margin-bottom: 40px;
}

.article-header .article-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
    color: var(--accent-light);
    margin-bottom: 20px;
}

.article-header h1 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.article-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 40px 0 20px;
}

.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 32px 0 16px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul, .article-content ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content strong {
    color: var(--text-primary);
}

.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    color: var(--text-primary);
}

.article-cta {
    margin-top: 48px;
    padding: 32px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(99, 102, 241, 0.1));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.article-cta h3 {
    font-size: 22px;
    margin-bottom: 12px;
}

.article-cta p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 480px;
    width: 100%;
    padding: 40px;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition);
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 24px;
    box-shadow: 0 0 30px var(--accent-glow);
}

.modal h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.modal p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 15px;
    line-height: 1.6;
}

.modal .btn-tg {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 16px;
}

.modal-hint {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    position: relative;
    z-index: 1;
    padding: 60px 24px 40px;
    border-top: 1px solid var(--border);
    margin-top: 80px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
    transition: var(--transition);
}

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

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        padding: 20px;
        flex-direction: column;
        gap: 16px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

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

    .hero {
        padding-top: 120px;
    }

    .features-grid,
    .steps,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
