/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --text-dark: #1a202c;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --text-dark: #f7fafc;
    --text-light: #a0aec0;
    --bg-light: #1a202c;
    --bg-white: #2d3748;
    --border-color: #4a5568;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-dark);
}

.logo {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2rem;
    padding: 0;
}

.theme-toggle:hover {
    background: var(--bg-light);
    transform: scale(1.1);
}

.theme-icon {
    display: block;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: all 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    gap: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.3s;
}

.mobile-menu a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.hero-note {
    font-size: 0.875rem;
    opacity: 0.9;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.demo-frame {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 850px;
}

.demo-image {
    max-width: 100%;
    border-radius: 8px;
    height: auto;
}

/* Animated Demo */
.animated-demo {
    width: 100%;
    max-width: 800px;
    height: 400px;
    position: relative;
}

.demo-browser {
    width: 100%;
    height: 100%;
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.demo-browser-bar {
    background: var(--bg-light);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
}

.demo-browser-dots {
    display: flex;
    gap: 4px;
}

.demo-browser-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
}

.demo-browser-dots span:nth-child(1) { background: #ff5f57; }
.demo-browser-dots span:nth-child(2) { background: #ffbd2e; }
.demo-browser-dots span:nth-child(3) { background: #28ca42; }

.demo-browser-url {
    flex: 1;
    background: var(--bg-white);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
}

.demo-content {
    padding: 24px;
    height: calc(100% - 45px);
    position: relative;
    overflow: hidden;
}

.demo-article {
    animation: fadeIn 0.5s ease-in;
}

.demo-line {
    height: 8px;
    background: linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 50%, #e0e0e0 100%);
    border-radius: 4px;
    margin-bottom: 12px;
    animation: shimmer 2s infinite;
}

.demo-line.short {
    width: 60%;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateX(-20px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0) scale(1); 
    }
}

@keyframes slideInRight {
    from { 
        opacity: 0; 
        transform: translateX(20px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0) scale(1); 
    }
}

.demo-widget {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 360px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    animation: slideIn 0.8s ease-out 1s both;
    color: white;
}

.demo-widget-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-bottom: 16px;
    font-size: 16px;
}

.demo-icon {
    font-size: 20px;
}

.demo-dialogue {
    margin-bottom: 16px;
    max-height: 180px;
    overflow: hidden;
}

.demo-message {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    opacity: 0;
    animation: fadeIn 0.4s ease-out forwards;
}

.demo-message-1 {
    animation-delay: 1.5s;
}

.demo-message-2 {
    animation-delay: 2.5s;
}

.demo-message-3 {
    animation-delay: 3.5s;
}

.demo-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.demo-avatar-1 {
    background: rgba(255, 255, 255, 0.25);
}

.demo-avatar-2 {
    background: rgba(255, 255, 255, 0.35);
}

.demo-bubble {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    backdrop-filter: blur(10px);
    flex: 1;
    word-wrap: break-word;
}

.demo-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
}

.demo-play-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.demo-play-btn:hover {
    transform: scale(1.1);
}

.demo-progress {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.demo-progress-bar {
    height: 100%;
    background: white;
    border-radius: 2px;
    width: 0%;
    animation: progress 4s ease-in-out 2s infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 65%; }
    100% { width: 100%; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .animated-demo {
        max-width: 100%;
        height: 350px;
    }
    
    .demo-widget {
        width: 300px;
        bottom: 16px;
        right: 16px;
        padding: 16px;
    }
    
    .demo-bubble {
        font-size: 12px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .animated-demo {
        height: 300px;
    }
    
    .demo-widget {
        width: calc(100% - 32px);
        right: 16px;
        left: 16px;
    }
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* How It Works */
.how-it-works {
    padding: 5rem 0;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.step-content p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Technology Section */
.tech {
    padding: 5rem 0;
    background: var(--bg-light);
}

.tech-content {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.tech-stack {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.tech-stack h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.badge {
    background: var(--bg-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    border: 2px solid var(--border-color);
}

.tech-highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.tech-highlight h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.tech-highlight p {
    font-size: 1.125rem;
    line-height: 1.6;
    opacity: 0.95;
}

/* Use Cases */
.use-cases {
    padding: 5rem 0;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.use-case {
    text-align: center;
    padding: 2rem;
}

.use-case h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.use-case p {
    color: var(--text-light);
}

/* CTA Section */
.cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

[data-theme="dark"] .footer {
    background: #1a202c;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-brand {
        font-size: 1.25rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
    
    .features {
        padding: 3rem 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .how-it-works {
        padding: 3rem 0;
    }
    
    .step {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .tech {
        padding: 3rem 0;
    }
    
    .use-cases {
        padding: 3rem 0;
    }
    
    .use-cases-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cta {
        padding: 3rem 0;
    }
    
    .cta h2 {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .feature-card h3 {
        font-size: 1.25rem;
    }
    
    .step-content h3 {
        font-size: 1.25rem;
    }
    
    .demo-frame {
        padding: 1rem;
    }
}
