:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --bg-dark: #0f0f1e;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    overflow-x: hidden;
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    gap: 0.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.5rem;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.lang-btn.active {
    background: var(--primary);
    color: var(--text);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.glow-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: 20%;
    right: 15%;
    animation-delay: 5s;
}

.glow-3 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-50px, 50px) scale(0.9); }
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
}

.ai-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--primary);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2rem;
    overflow: hidden;
}

.badge-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Features Section */
.features {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    grid-auto-flow: dense;
}

.bento-item {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bento-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(99, 102, 241, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bento-item:hover::before {
    opacity: 1;
}

.bento-item:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
}

.bento-item.large {
    grid-column: span 2;
}

.bento-item.medium {
    grid-column: span 1;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.bento-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.bento-item p {
    color: var(--text-muted);
    line-height: 1.6;
}

.code-preview {
    margin-top: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.75rem;
    padding: 1.5rem;
    font-family: 'Monaco', 'Courier New', monospace;
}

.code-line {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.code-line.success {
    color: #4ade80;
    border-left: 3px solid #4ade80;
    padding-left: 1rem;
}

.chart-preview {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.mini-node {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.mini-connections {
    display: flex;
    gap: 1rem;
}

.mini-node.small {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* AI Demo Section */
.ai-demo {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.05), transparent);
}

.demo-container {
    max-width: 900px;
    margin: 0 auto;
}

.demo-header {
    text-align: center;
    margin-bottom: 3rem;
}

.demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(236, 72, 153, 0.2);
    border: 1px solid var(--accent);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1rem;
}

.demo-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.demo-header p {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.demo-chat {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
}

.demo-suggestions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.suggestion {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary);
    color: var(--text);
    padding: 0.75rem 1.25rem;
    border-radius: 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.suggestion:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.chat-messages {
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
}

.chat-message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-message.user .message-avatar {
    background: linear-gradient(135deg, var(--accent), var(--secondary));
}

.message-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 1rem;
    max-width: 80%;
    line-height: 1.6;
}

.chat-message.user .message-content {
    background: var(--primary);
}

.chat-input-container {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.send-btn {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border: none;
    border-radius: 1rem;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    transition: all 0.3s ease;
}

.send-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.demo-disclaimer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    background: rgba(236, 72, 153, 0.1);
    border-radius: 0.75rem;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

/* CTA Section */
.cta {
    padding: 6rem 2rem;
    text-align: center;
}

.cta-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.cta-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-logo i {
    color: var(--primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .bento-item.large,
    .bento-item.medium {
        grid-column: span 1;
    }
    
    .language-selector {
        top: 1rem;
        right: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Loading Animation */
.loading-dots {
    display: inline-flex;
    gap: 0.25rem;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
