/* Grok-style Landing Page */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #13131d;
    --bg-card: #1a1a27;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --accent-blue: #00d4ff;
    --accent-purple: #b537ff;
    --gradient: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    --glow-blue: 0 0 20px rgba(0, 212, 255, 0.5);
    --glow-purple: 0 0 20px rgba(181, 55, 255, 0.5);
}

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

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

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

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    padding: 20px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
}

.logo-icon {
    font-size: 32px;
    animation: pulse 2s infinite;
}

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

.logo-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    color: var(--accent-blue);
}

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

.nav a, .nav-dropdown-toggle {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.nav a:hover, .nav-dropdown-toggle:hover {
    color: var(--accent-blue);
}

/* Dropdown menu */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
    user-select: none;
    display: inline-block;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 5px); /* Уменьшаем отступ */
    left: 0;
    background: rgba(26, 26, 39, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    padding: 8px 0;
}

/* Создаем невидимый мост между кнопкой и меню */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
}

.nav-dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    color: var(--accent-blue);
    background: rgba(0, 212, 255, 0.15);
}

/* Показываем меню при наведении на родительский элемент */
.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

/* Убираем стандартное поведение ссылки-триггера */
.nav-dropdown-toggle:active {
    pointer-events: none;
}

.btn-cta {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
}

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

/* Hero Section */
.hero {
    padding: 150px 0 100px;
    position: relative;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 400px;
}

.ai-orb {
    width: 300px;
    height: 300px;
    background: var(--gradient);
    border-radius: 50%;
    filter: blur(60px);
    animation: float 6s ease-in-out infinite;
}

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

/* Features Section */
.features {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.section-title {
    font-size: 48px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 60px;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 40px;
    transition: transform 0.3s, border-color 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Chat Section */
.chat-section {
    padding: 100px 0;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 18px;
    margin-top: -40px;
    margin-bottom: 40px;
}

.chat-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.chat-header {
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.status-dot {
    width: 10px;
    height: 10px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-model {
    color: var(--text-secondary);
    font-size: 14px;
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 4px;
}

.message {
    display: flex;
    gap: 15px;
    animation: slideIn 0.3s ease-out;
}

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

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    font-size: 32px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 12px;
    max-width: 70%;
}

.bot-message .message-content {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(181, 55, 255, 0.1));
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.user-message .message-content {
    background: rgba(255, 255, 255, 0.08);
}

.message-content p {
    margin: 0;
    line-height: 1.6;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px 20px;
}

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

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

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

.chat-input-form {
    display: flex;
    gap: 10px;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 20px;
    color: white;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input:focus {
    border-color: var(--accent-blue);
}

.chat-send-btn {
    background: var(--gradient);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.3s;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--glow-blue);
}

.send-icon {
    font-size: 24px;
    font-weight: bold;
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    text-align: center;
    background: var(--bg-secondary);
}

.cta-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
}

.cta-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-primary, .btn-secondary {
    padding: 15px 40px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient);
    border: none;
    color: white;
}

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

.btn-secondary {
    background: transparent;
    border: 2px solid var(--accent-blue);
    color: var(--accent-blue);
}

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    padding: 60px 0 30px;
    background: var(--bg-primary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-tagline {
    color: var(--text-secondary);
}

.footer-column h4 {
    margin-bottom: 15px;
    color: var(--accent-blue);
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.burger-line {
    width: 100%;
    height: 3px;
    background: var(--accent-blue);
    border-radius: 10px;
    transition: all 0.3s ease;
}

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

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

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

.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 999;
}

.mobile-nav.active {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
}

.mobile-nav-link {
    display: block;
    padding: 15px 30px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.mobile-nav-link:hover {
    color: var(--accent-blue);
    background: rgba(0, 212, 255, 0.05);
    border-left-color: var(--accent-blue);
}

.mobile-nav-dropdown {
    padding: 15px 30px;
}

.mobile-nav-dropdown-toggle {
    display: block;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s;
}

.mobile-nav-dropdown-toggle:hover {
    color: var(--accent-blue);
}

.mobile-nav-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 20px;
}

.mobile-nav-dropdown-menu.active {
    max-height: 300px;
    margin-top: 10px;
}

.mobile-nav-dropdown-menu a {
    display: block;
    padding: 12px 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.mobile-nav-dropdown-menu a:hover {
    color: var(--accent-blue);
}

.btn-cta-mobile {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 18px;
    cursor: pointer;
    width: calc(100% - 60px);
    margin: 20px 30px 10px;
    transition: transform 0.2s, box-shadow 0.3s;
}

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

/* Markdown Content Styles */
.markdown-content {
    font-size: 15px;
    line-height: 1.7;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--accent-blue);
}

.markdown-content h1 {
    font-size: 2em;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
    padding-bottom: 8px;
}

.markdown-content h2 {
    font-size: 1.5em;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    padding-bottom: 6px;
}

.markdown-content h3 {
    font-size: 1.25em;
}

.markdown-content h4 {
    font-size: 1.1em;
}

.markdown-content p {
    margin-bottom: 16px;
    margin-top: 0;
}

.markdown-content ul,
.markdown-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.markdown-content li {
    margin: 6px 0;
    line-height: 1.6;
}

.markdown-content ul li {
    list-style-type: disc;
}

.markdown-content ol li {
    list-style-type: decimal;
}

.markdown-content li::marker {
    color: var(--accent-blue);
}

/* Code blocks */
.markdown-content pre {
    background: #282c34;
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    overflow-x: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.markdown-content pre code {
    background: none;
    padding: 0;
    border: none;
    border-radius: 0;
    color: #abb2bf;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
}

/* Inline code */
.markdown-content code {
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-blue);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.markdown-content blockquote {
    border-left: 4px solid var(--accent-blue);
    padding-left: 16px;
    margin: 16px 0;
    color: var(--text-secondary);
    font-style: italic;
    background: rgba(0, 212, 255, 0.05);
    padding: 12px 16px;
    border-radius: 4px;
}

.markdown-content a {
    color: var(--accent-purple);
    text-decoration: none;
    border-bottom: 1px solid rgba(181, 55, 255, 0.3);
    transition: all 0.2s;
}

.markdown-content a:hover {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.markdown-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

.markdown-content em {
    font-style: italic;
    color: var(--text-secondary);
}

.markdown-content hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 24px 0;
}

/* Tables */
.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.markdown-content th,
.markdown-content td {
    padding: 12px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.markdown-content th {
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-blue);
    font-weight: 700;
}

.markdown-content tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Responsive */
@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-stats {
        flex-wrap: wrap;
    }

    .nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-nav {
        display: block;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .markdown-content pre {
        padding: 12px;
        font-size: 13px;
    }
}
