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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

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

.logo {
    height: 32px;
    width: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #1e40af;
}

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

.nav-links a {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #1e40af;
}

.paper-link {
    background: #1e40af;
    color: white !important;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.paper-link:hover {
    background: #1d4ed8;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 50%, #e2e8f0 100%);
    overflow: hidden;
    position: relative;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    min-height: 600px;
}

.hero-content {
    max-width: 500px;
    text-align: left;
    z-index: 2;
    position: relative;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 48px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

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

.hero-demo-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    transform: translateY(40px);
    z-index: 1;
}

.demo-caption {
    text-align: center;
    margin-top: 20px;
}

.demo-caption p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #64748b;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 24px;
    border-radius: 25px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    margin: 0;
}

/* Add floating effect for hero demo */
.hero-demo-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.1), rgba(59, 130, 246, 0.1));
    border-radius: 30px;
    z-index: -1;
    opacity: 0.8;
}

.hero-demo-container::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.05), rgba(59, 130, 246, 0.05));
    border-radius: 40px;
    z-index: -2;
    opacity: 0.6;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid #667eea;
    cursor: pointer;
    position: relative;
}

.btn-primary {
    background: #667eea !important;
    color: white !important;
    border: 2px solid #667eea !important;
    border-radius: 25px !important;
    padding: 12px 24px !important;
}

.btn-primary:hover {
    background: #5a67d8 !important;
    border-color: #5a67d8 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
}

.btn-secondary {
    background: rgba(102, 126, 234, 0.1) !important;
    color: #667eea !important;
    border: 2px solid #667eea !important;
    border-radius: 25px !important;
    padding: 12px 24px !important;
}

.btn-secondary:hover {
    background: #667eea !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
}

/* Capabilities Section */
.capabilities {
    padding: 80px 0;
    background: white;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 64px;
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.capability-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.capability-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.capability-demo {
    position: relative;
    min-height: 250px;
    overflow: hidden;
}

.capability-demo .rex-demo-widget {
    background: transparent;
    padding: 15px;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
}

.capability-demo .rex-demo-widget .demo-container {
    max-width: 100%;
}

.capability-demo .rex-demo-widget .image-container {
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.capability-demo .rex-demo-widget .terminal-container {
    height: 120px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.capability-demo .rex-demo-widget .terminal-content {
    font-size: 0.7rem;
    padding: 8px;
}

.capability-demo .rex-demo-widget .demo-control-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
}

.capability-content {
    padding: 24px;
}

.capability-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.capability-content p {
    color: #64748b;
    line-height: 1.6;
}

/* Performance Section */
.performance {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.performance-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    margin-top: 48px;
}

.performance-text h3 {
    font-size: 2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 24px;
}

.performance-text p {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 32px;
    line-height: 1.7;
}

.highlights {
    display: flex;
    gap: 32px;
}

.highlight-item {
    text-align: center;
}

.highlight-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e40af;
}

.highlight-text {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.performance-visual {
    display: flex;
    justify-content: center;
}

.architecture-diagram img {
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Quick Start Section */
.quickstart {
    padding: 80px 0;
    background: white;
}

.code-section {
    background: #1e293b;
    border-radius: 16px;
    overflow: hidden;
    margin: 48px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.code-tabs {
    display: flex;
    background: #334155;
    border-bottom: 1px solid #475569;
}

.code-tab {
    padding: 16px 24px;
    background: none;
    border: none;
    color: #94a3b8;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.code-tab.active {
    background: #1e293b;
    color: white;
}

.code-tab:hover {
    color: white;
}

.code-content {
    position: relative;
}

.code-block {
    display: none;
    padding: 0;
}

.code-block.active {
    display: block;
}

.code-block pre {
    margin: 0;
    padding: 24px;
    background: #1e293b;
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
}

.code-block code {
    background: none;
    color: inherit;
    font-size: inherit;
}

.quickstart-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 48px;
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #667eea;
}

.link-button:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Open Source Section */
.opensource {
    padding: 80px 0;
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    color: white;
}

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

.opensource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin: 48px 0;
}

.opensource-item {
    text-align: center;
    padding: 32px 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.opensource-item:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.15);
}

.opensource-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.opensource-item h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.opensource-item p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.opensource-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 48px;
}

.opensource .btn-primary {
    background: white;
    color: #667eea;
    border: 2px solid white;
}

.opensource .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.opensource .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.opensource .btn-secondary:hover {
    background: white;
    color: #667eea;
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 64px 0 32px;
}

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

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

.footer-logo .logo {
    height: 28px;
    width: 28px;
    filter: brightness(0) invert(1); /* 将logo变为白色 */
}

.footer-logo .logo-text {
    color: white;
}

.footer-left p {
    color: #94a3b8;
    margin-bottom: 24px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
}

.footer-section a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid #334155;
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-demo-container {
        transform: translateY(20px);
        max-width: 400px;
    }
    
    .nav-links {
        display: none;
    }
    
    .performance-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .highlights {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .capabilities-grid {
        grid-template-columns: 1fr;
    }
    
    .opensource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .quickstart-links {
        flex-direction: column;
        align-items: center;
    }
    
    .link-button {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .opensource-grid {
        grid-template-columns: 1fr;
    }
}
