/* ══════════════════════════════════════
   OmniSolver Code — Landing Page Styles
   Тёмная тема, звёзды/искорки, code aesthetic
   ══════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #09090f;
    --bg-card: #0f0f1a;
    --bg-card-hover: #161625;
    --bg-section-dark: #060610;
    --border: #1a1a2e;
    --border-light: #252540;

    --text: #e2e2f0;
    --text-secondary: #8080a0;
    --text-muted: #4e4e6a;

    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.25);

    --accent: #06b6d4;
    --accent-light: #22d3ee;
    --accent-glow: rgba(6, 182, 212, 0.2);

    --gradient: linear-gradient(135deg, #6366f1, #06b6d4);
    --gradient-text: linear-gradient(135deg, #818cf8, #22d3ee);
    --gradient-card: linear-gradient(145deg, rgba(99,102,241,0.08), rgba(6,182,212,0.05));

    --code-bg: #0d0d1a;
    --code-border: #1e1e35;

    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container: 1200px;

    --font-code: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; }

/* ── Background Effects ── */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: 0;
}

.bg-glow-1 {
    width: 500px;
    height: 500px;
    background: rgba(99, 102, 241, 0.15);
    top: -150px;
    right: -100px;
}

.bg-glow-2 {
    width: 400px;
    height: 400px;
    background: rgba(6, 182, 212, 0.1);
    bottom: 30%;
    left: -150px;
}

.bg-glow-3 {
    width: 300px;
    height: 300px;
    background: rgba(139, 92, 246, 0.08);
    top: 50%;
    right: 20%;
}

#particles-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* ── Container ── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.container-sm {
    max-width: 800px;
}

/* ── Navigation ── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 12px 0;
    background: rgba(9, 9, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
    transition: var(--transition);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    white-space: nowrap;
}

.nav-logo-icon {
    flex-shrink: 0;
}

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

.nav-links {
    display: flex;
    gap: 28px;
    margin-left: auto;
}

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

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

#nav-auth {
    margin-left: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    text-decoration: none;
    transition: var(--transition);
}

.nav-user-badge:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.nav-user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.nav-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.nav-logo-img {
    border-radius: 6px;
    flex-shrink: 0;
}

.nav-admin-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 16px;
    text-decoration: none;
    transition: var(--transition);
}

.nav-admin-link:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.nav-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.nav-logout-btn:hover {
    border-color: #f87171;
    color: #f87171;
    background: rgba(248, 113, 113, 0.08);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.btn-ghost {
    background: rgba(99, 102, 241, 0.08);
    color: var(--text);
    border: 1px solid var(--border-light);
}

.btn-ghost:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
}

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; justify-content: center; }

/* ── Burger ── */
.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}

.nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-burger.active span:nth-child(2) {
    opacity: 0;
}

.nav-burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(9, 9, 15, 0.95);
    backdrop-filter: blur(20px);
    padding: 24px;
    flex-direction: column;
    gap: 16px;
    z-index: 99;
    border-bottom: 1px solid var(--border);
}

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

.mobile-menu a {
    font-size: 16px;
    color: var(--text-secondary);
    padding: 8px 0;
}

/* ── Hero ── */
.hero {
    padding: 140px 0 60px;
    text-align: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 100px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-size: 13px;
    color: var(--primary-light);
    margin-bottom: 24px;
    font-weight: 500;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.hero-title {
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

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

.hero-subtitle {
    font-size: clamp(16px, 2vw, 19px);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

/* ── Code Preview ── */
.hero-code-preview {
    max-width: 680px;
    margin: 0 auto 48px;
}

.code-window {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    text-align: left;
}

.code-window-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--code-border);
}

.code-window-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.code-window-title {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-code);
}

.code-window-body {
    padding: 20px;
    font-family: var(--font-code);
    font-size: 13px;
    line-height: 1.7;
}

.code-chat-msg {
    margin-bottom: 16px;
}

.code-chat-msg:last-child {
    margin-bottom: 0;
}

.code-chat-role {
    font-weight: 600;
    font-size: 12px;
    display: block;
    margin-bottom: 6px;
}

.code-chat-user .code-chat-role {
    color: var(--accent-light);
}

.code-chat-ai .code-chat-role {
    color: var(--primary-light);
}

.code-chat-user {
    color: var(--text-secondary);
    font-size: 13px;
}

.code-block-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 14px;
    overflow-x: auto;
}

.code-block {
    margin: 0;
    font-family: var(--font-code);
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--text);
}

.code-block .kw { color: #c792ea; }
.code-block .fn { color: #82aaff; }
.code-block .str { color: #c3e88d; }
.code-block .lib { color: #ffcb6b; }
.code-block .cm { color: #546e7a; }

/* ── Hero Stats ── */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.hero-stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
    align-self: center;
}

/* ── Sections ── */
.section {
    padding: 80px 0;
    position: relative;
    z-index: 2;
}

.section-dark {
    background: var(--bg-section-dark);
}

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

.section-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 100px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.15);
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

/* ── Steps ── */
.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    text-align: center;
    padding: 32px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    transition: var(--transition);
}

.step:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.step-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.step h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.step p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.step-arrow {
    color: var(--text-muted);
    font-size: 24px;
    align-self: center;
    margin-top: 20px;
}

/* ── Features Grid ── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.1);
    background: var(--bg-card-hover);
}

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

.feature-icon {
    font-size: 28px;
    margin-bottom: 14px;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

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

/* ── Languages Showcase ── */
.languages-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.lang-category {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.lang-category:hover {
    border-color: var(--border-light);
}

.lang-category-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
}

.lang-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lang-tag {
    padding: 5px 12px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.12);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    font-family: var(--font-code);
    transition: var(--transition);
}

.lang-tag:hover {
    color: var(--text);
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
}

.lang-tag-accent {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.2);
    color: var(--accent-light);
}

/* ── Pricing ── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
}

.pricing-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    position: relative;
    transition: var(--transition);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.pricing-card-popular {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.08), var(--bg-card));
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.15);
    transform: scale(1.02);
}

.pricing-card-popular:hover {
    transform: scale(1.02) translateY(-4px);
}

.pricing-card-ultra {
    border-color: rgba(6, 182, 212, 0.3);
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.05), var(--bg-card));
}

.pricing-popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    border-radius: 100px;
    background: var(--gradient);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.pricing-header {
    text-align: center;
    margin-bottom: 24px;
}

.pricing-emoji {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.pricing-name {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.pricing-price {
    font-size: 28px;
    font-weight: 800;
}

.pricing-per {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.pricing-period {
    font-size: 12px;
    color: var(--text-muted);
}

.pricing-features {
    margin-bottom: 24px;
}

.pricing-features li {
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.pricing-features li::before {
    content: '✓ ';
    color: var(--accent);
    font-weight: 600;
}

/* ── FAQ ── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.faq-question {
    width: 100%;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: var(--transition);
}

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

.faq-chevron {
    transition: var(--transition);
    flex-shrink: 0;
    margin-left: 12px;
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 0 20px;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 20px 18px;
}

/* ── CTA ── */
.section-cta {
    background: linear-gradient(180deg, var(--bg-section-dark), var(--bg));
    padding: 80px 0;
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 800;
    margin-bottom: 12px;
}

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

.cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ── Footer ── */
.footer {
    padding: 48px 0 24px;
    border-top: 1px solid var(--border);
    z-index: 2;
    position: relative;
    background: var(--bg-section-dark);
}

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

.footer-logo-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-logo-text {
    font-size: 18px;
    font-weight: 700;
}

.footer-brand .footer-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.footer-col a {
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
}

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

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}

.footer-bottom-links {
    display: flex;
    gap: 16px;
}

.footer-bottom-links a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: var(--text);
}

/* ── Scroll animations ── */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ── Responsive ── */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .languages-showcase {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    #nav-auth { display: none; }
    .nav-burger { display: flex; }

    .hero { padding: 110px 0 40px; }
    .hero-title { font-size: 28px; }

    .hero-code-preview { margin: 0 -8px 32px; }

    .steps { flex-direction: column; align-items: center; }
    .step-arrow { transform: rotate(90deg); margin: 0; }
    .step { max-width: 100%; }

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

    .languages-showcase {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 360px;
        margin: 0 auto;
    }

    .pricing-card-popular {
        transform: none;
    }

    .pricing-card-popular:hover {
        transform: translateY(-4px);
    }

    .hero-stats {
        gap: 20px;
    }

    .hero-stat-divider {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }

    .footer-logo-row {
        justify-content: center;
    }

    .footer-col {
        align-items: center;
    }

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