/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

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

.btn-download {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    width: 100%;
    margin-top: 1rem;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 172, 254, 0.3);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    transform: translateY(0) !important;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Dark mode support for header */
@media (prefers-color-scheme: dark) {
    .header {
        background: rgba(28, 28, 30, 0.95);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-logo {
        color: #ffffff;
    }
    
    .nav-link {
        color: #ffffff;
    }
    
    .nav-link:hover {
        color: #667eea;
    }
    
    .nav-toggle-line {
        background: #ffffff;
    }
    
    .lang-link {
        color: #ffffff;
    }
    
    .lang-link:hover {
        color: #667eea;
    }
    
    .lang-link.active {
        color: #667eea;
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: #333;
}

.logo-img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #667eea;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle-line {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-link {
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    text-decoration: none;
}

.lang-link:hover {
    color: #667eea;
}

.lang-link.active {
    color: #667eea;
    font-weight: 600;
}

.lang-separator {
    color: #ccc;
    font-size: 0.9rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="1" fill="white" opacity="0.1"/><circle cx="10" cy="90" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    color: white;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
    word-spacing: normal !important;
    letter-spacing: normal !important;
    white-space: normal !important;
    font-feature-settings: normal !important;
    text-rendering: optimizeLegibility !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 400 !important;
    text-transform: none !important;
    font-variant: normal !important;
    font-stretch: normal !important;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-demo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.demo-window {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.demo-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-controls {
    display: flex;
    gap: 0.5rem;
}

.demo-control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.demo-control.red { background: #ff5f57; }
.demo-control.yellow { background: #ffbd2e; }
.demo-control.green { background: #28ca42; }

.demo-title {
    color: white;
    font-weight: 500;
    opacity: 0.8;
}

.demo-content {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
}

.code-line {
    display: flex;
    margin-bottom: 0.5rem;
    color: white;
}

.line-number {
    color: rgba(255, 255, 255, 0.5);
    margin-right: 1rem;
    min-width: 20px;
}

.keyword { color: #ff79c6; }
.function { color: #50fa7b; }
.param { color: #8be9fd; }
.comment { color: #6272a4; }
.number { color: #bd93f9; }

.ai-suggestion {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(80, 250, 123, 0.1);
    border-radius: 6px;
    border-left: 3px solid #50fa7b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestion-icon {
    font-size: 1.2rem;
}

.suggestion-text {
    color: #50fa7b;
    font-size: 13px;
}

/* Trust Section */
.trust {
    padding: 4rem 0;
    background: white;
    text-align: center;
}

.trust-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.trust-text {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.trust-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.trust-logo {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    color: #666;
    font-weight: 500;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.trust-logo:hover {
    opacity: 1;
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: #f8f9fa;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.feature-description {
    color: #666;
    line-height: 1.6;
}

/* Tab Feature Section */
.tab-feature {
    padding: 6rem 0;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    text-align: center;
    color: white;
}

.tab-feature-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.tab-feature-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.tab-feature-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.tab-feature-demo {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.codebase-indexing-image {
    width: 90%;
    max-width: 700px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.indexing-screenshot {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.indexing-screenshot:hover {
    transform: scale(1.02);
}

/* Modes Section */
.modes {
    padding: 6rem 0;
    background: white;
}

.modes-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.mode-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.mode-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.mode-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
}

.mode-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.mode-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mode-feature {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Download Section */
.download {
    padding: 6rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.download-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.download .section-title,
.download .section-subtitle {
    color: white;
}

.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.download-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.download-card:hover {
    transform: translateY(-5px);
}

.download-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.download-icon svg {
    width: 48px;
    height: 48px;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease, transform 0.3s ease;
}

.download-card:hover .download-icon svg {
    color: white;
    transform: scale(1.1);
}

.download-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.download-description {
    opacity: 0.8;
    margin-bottom: 1rem;
}

/* Auto-detected download card */
.download-card.auto-detected {
    border: 2px solid #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    position: relative;
    overflow: hidden;
}

.download-card.auto-detected::before {
    content: '推荐';
    position: absolute;
    top: 10px;
    right: -25px;
    background: #667eea;
    color: white;
    padding: 4px 30px;
    font-size: 12px;
    font-weight: 600;
    transform: rotate(45deg);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* English version */
html[lang="en"] .download-card.auto-detected::before {
    content: 'Recommended';
}

.download-card.auto-detected:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
}

/* Documentation Section */
.documentation {
    padding: 6rem 0;
    background: #f8f9fa;
}

.documentation-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.doc-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.doc-card:hover {
    transform: translateY(-5px);
}

.doc-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.doc-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
}

.doc-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.doc-link {
    color: #667eea;
    font-weight: 500;
    transition: color 0.3s ease;
}

.doc-link:hover {
    color: #764ba2;
}

/* FAQ Section */
.faq {
    padding: 6rem 0;
    background: white;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.faq-list {
    margin-top: 3rem;
}

.faq-item {
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: #667eea;
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 500;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

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

.faq-item.active .faq-answer {
    max-height: 200px;
    padding-bottom: 1.5rem;
}

.faq-answer p {
    color: #666;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 4rem 0 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-description {
    color: #ccc;
    margin-bottom: 0;
}

.footer-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright,
.footer-update {
    color: #999;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Scroll animations will be handled by JavaScript */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}